| Index: webkit/glue/webkitclient_impl.cc
|
| ===================================================================
|
| --- webkit/glue/webkitclient_impl.cc (revision 30574)
|
| +++ webkit/glue/webkitclient_impl.cc (working copy)
|
| @@ -15,6 +15,7 @@
|
| #include "base/file_path.h"
|
| #include "base/file_util.h"
|
| #include "base/message_loop.h"
|
| +#include "base/process_util.h"
|
| #include "base/platform_file.h"
|
| #include "base/stats_counters.h"
|
| #include "base/string_util.h"
|
| @@ -363,6 +364,14 @@
|
| return WebKit::WebString();
|
| }
|
|
|
| +int WebKitClientImpl::memoryUsageMB() {
|
| + using base::ProcessMetrics;
|
| + static ProcessMetrics* process_metrics =
|
| + ProcessMetrics::CreateProcessMetrics(base::GetCurrentProcessHandle());
|
| + DCHECK(process_metrics);
|
| + return process_metrics->GetPagefileUsage() >> 20;
|
| +}
|
| +
|
| bool WebKitClientImpl::fileExists(const WebKit::WebString& path) {
|
| FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path);
|
| return file_util::PathExists(FilePath(file_path));
|
|
|