diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 04:38:38 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 04:38:38 +0000 |
commit | 835d7c811c98f179090c57a827a9c9baa2130435 (patch) | |
tree | edcff6b2c9029c6f867f650d762837f2485d99fb /webkit | |
parent | 4b1deac7ba7e7a6bf0425e6ed4db26e0c29daa7f (diff) | |
download | chromium_src-835d7c811c98f179090c57a827a9c9baa2130435.zip chromium_src-835d7c811c98f179090c57a827a9c9baa2130435.tar.gz chromium_src-835d7c811c98f179090c57a827a9c9baa2130435.tar.bz2 |
Move Stats, histograms, and field trial into a metrics subdirectory of base and
put them in the base namespace.
TEST=it compiles
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/appcache/appcache_histograms.cc | 2 | ||||
-rw-r--r-- | webkit/extensions/v8/benchmarking_extension.cc | 11 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_plugin_instance.cc | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_lib.cc | 10 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl.cc | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 10 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 6 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_win.cc | 6 | ||||
-rw-r--r-- | webkit/glue/plugins/webview_plugin.cc | 2 | ||||
-rw-r--r-- | webkit/glue/site_isolation_metrics.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 6 | ||||
-rw-r--r-- | webkit/support/test_webkit_client.cc | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 6 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 1 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_webkit_init.cc | 4 |
16 files changed, 43 insertions, 43 deletions
diff --git a/webkit/appcache/appcache_histograms.cc b/webkit/appcache/appcache_histograms.cc index 9907047..dc8e419 100644 --- a/webkit/appcache/appcache_histograms.cc +++ b/webkit/appcache/appcache_histograms.cc @@ -4,7 +4,7 @@ #include "webkit/appcache/appcache_histograms.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" namespace appcache { diff --git a/webkit/extensions/v8/benchmarking_extension.cc b/webkit/extensions/v8/benchmarking_extension.cc index 1a30968..b7abc57 100644 --- a/webkit/extensions/v8/benchmarking_extension.cc +++ b/webkit/extensions/v8/benchmarking_extension.cc @@ -1,13 +1,14 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "webkit/extensions/v8/benchmarking_extension.h" + #include "base/command_line.h" -#include "base/stats_table.h" +#include "base/metrics/stats_table.h" #include "base/time.h" #include "net/http/http_network_layer.h" #include "third_party/WebKit/WebKit/chromium/public/WebCache.h" -#include "webkit/extensions/v8/benchmarking_extension.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebCache; @@ -107,7 +108,7 @@ class BenchmarkingWrapper : public v8::Extension { } static v8::Handle<v8::Value> GetCounter(const v8::Arguments& args) { - if (!args.Length() || !args[0]->IsString() || !StatsTable::current()) + if (!args.Length() || !args[0]->IsString() || !base::StatsTable::current()) return v8::Undefined(); // Extract the name argument @@ -116,7 +117,7 @@ class BenchmarkingWrapper : public v8::Extension { name[1] = ':'; args[0]->ToString()->WriteAscii(&name[2], 0, sizeof(name) - 3); - int counter = StatsTable::current()->GetCounterValue(name); + int counter = base::StatsTable::current()->GetCounterValue(name); return v8::Integer::New(counter); } diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc index c051fff..30c4fb3 100644 --- a/webkit/glue/plugins/pepper_plugin_instance.cc +++ b/webkit/glue/plugins/pepper_plugin_instance.cc @@ -5,7 +5,7 @@ #include "webkit/glue/plugins/pepper_plugin_instance.h" #include "base/logging.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #if defined(OS_MACOSX) #include "base/mac_util.h" #include "base/scoped_cftyperef.h" diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc index 9a0770e..6c95274 100644 --- a/webkit/glue/plugins/plugin_lib.cc +++ b/webkit/glue/plugins/plugin_lib.cc @@ -6,7 +6,7 @@ #include "base/logging.h" #include "base/message_loop.h" -#include "base/stats_counters.h" +#include "base/metrics/stats_counters.h" #include "base/string_util.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/plugins/plugin_instance.h" @@ -72,7 +72,7 @@ PluginLib::PluginLib(const WebPluginInfo& info, saved_data_(0), instance_count_(0), skip_unload_(false) { - StatsCounter(kPluginLibrariesLoadedCounter).Increment(); + base::StatsCounter(kPluginLibrariesLoadedCounter).Increment(); memset(static_cast<void*>(&plugin_funcs_), 0, sizeof(plugin_funcs_)); g_loaded_libs->push_back(this); @@ -87,7 +87,7 @@ PluginLib::PluginLib(const WebPluginInfo& info, } PluginLib::~PluginLib() { - StatsCounter(kPluginLibrariesLoadedCounter).Decrement(); + base::StatsCounter(kPluginLibrariesLoadedCounter).Decrement(); if (saved_data_ != 0) { // TODO - delete the savedData object here } @@ -143,13 +143,13 @@ void PluginLib::PreventLibraryUnload() { PluginInstance* PluginLib::CreateInstance(const std::string& mime_type) { PluginInstance* new_instance = new PluginInstance(this, mime_type); instance_count_++; - StatsCounter(kPluginInstancesActiveCounter).Increment(); + base::StatsCounter(kPluginInstancesActiveCounter).Increment(); DCHECK_NE(static_cast<PluginInstance*>(NULL), new_instance); return new_instance; } void PluginLib::CloseInstance() { - StatsCounter(kPluginInstancesActiveCounter).Decrement(); + base::StatsCounter(kPluginInstancesActiveCounter).Decrement(); instance_count_--; // If a plugin is running in its own process it will get unloaded on process // shutdown. diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc index 53745466..c54bbc8 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,7 +11,6 @@ #include "base/message_loop.h" #include "base/process_util.h" #include "base/scoped_ptr.h" -#include "base/stats_counters.h" #include "base/string_util.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" #include "webkit/glue/plugins/plugin_constants_win.h" diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 3d112fa..bceda0e 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -14,7 +14,7 @@ #include "base/file_util.h" #include "base/message_loop.h" #include "base/process_util.h" -#include "base/stats_counters.h" +#include "base/metrics/stats_counters.h" #include "base/string_util.h" #include "gfx/blit.h" #include "skia/ext/platform_canvas.h" @@ -443,8 +443,8 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context, } // Tell the plugin to paint into the pixmap. - static StatsRate plugin_paint("Plugin.Paint"); - StatsScope<StatsRate> scope(plugin_paint); + static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsScope<base::StatsRate> scope(plugin_paint); NPError err = instance()->NPP_HandleEvent(&np_event); DCHECK_EQ(err, NPERR_NO_ERROR); @@ -474,8 +474,8 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context, event.drawable = GDK_PIXMAP_XID(pixmap_); // Tell the plugin to paint into the pixmap. - static StatsRate plugin_paint("Plugin.Paint"); - StatsScope<StatsRate> scope(plugin_paint); + static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsScope<base::StatsRate> scope(plugin_paint); NPError err = instance()->NPP_HandleEvent(&np_event); DCHECK_EQ(err, NPERR_NO_ERROR); diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index 11d244c..b7e7702 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -13,8 +13,8 @@ #include "base/file_util.h" #include "base/message_loop.h" +#include "base/metrics/stats_counters.h" #include "base/scoped_ptr.h" -#include "base/stats_counters.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" @@ -650,8 +650,8 @@ void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context, return; DCHECK(buffer_context_ == context); - static StatsRate plugin_paint("Plugin.Paint"); - StatsScope<StatsRate> scope(plugin_paint); + static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsScope<base::StatsRate> scope(plugin_paint); // Plugin invalidates trigger asynchronous paints with the original // invalidation rect; the plugin may be resized before the paint is handled, diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc index 2a10775..c9500d1 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc @@ -12,9 +12,9 @@ #include "base/iat_patch.h" #include "base/lazy_instance.h" #include "base/message_loop.h" +#include "base/metrics/stats_counters.h" #include "base/registry.h" #include "base/scoped_ptr.h" -#include "base/stats_counters.h" #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/string_util.h" @@ -1029,8 +1029,8 @@ void WebPluginDelegateImpl::WindowlessPaint(HDC hdc, // NOTE: NPAPI is not 64bit safe. It puts pointers into 32bit values. paint_event.wParam = PtrToUlong(hdc); paint_event.lParam = PtrToUlong(&damage_rect_win); - static StatsRate plugin_paint("Plugin.Paint"); - StatsScope<StatsRate> scope(plugin_paint); + static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsScope<base::StatsRate> scope(plugin_paint); instance()->NPP_HandleEvent(&paint_event); window_.window = old_dc; } diff --git a/webkit/glue/plugins/webview_plugin.cc b/webkit/glue/plugins/webview_plugin.cc index 9287028..feb5720 100644 --- a/webkit/glue/plugins/webview_plugin.cc +++ b/webkit/glue/plugins/webview_plugin.cc @@ -4,8 +4,8 @@ #include "webkit/glue/plugins/webview_plugin.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" diff --git a/webkit/glue/site_isolation_metrics.cc b/webkit/glue/site_isolation_metrics.cc index 912263f..58d8717 100644 --- a/webkit/glue/site_isolation_metrics.cc +++ b/webkit/glue/site_isolation_metrics.cc @@ -7,7 +7,7 @@ #include <set> #include "base/hash_tables.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "net/base/mime_sniffer.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index e9b05f1..648f3bd5 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -14,10 +14,10 @@ #include "base/lock.h" #include "base/message_loop.h" +#include "base/metrics/stats_counters.h" #include "base/process_util.h" #include "base/platform_file.h" #include "base/singleton.h" -#include "base/stats_counters.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/time.h" @@ -217,11 +217,11 @@ void WebKitClientImpl::getPluginList(bool refresh, } void WebKitClientImpl::decrementStatsCounter(const char* name) { - StatsCounter(name).Decrement(); + base::StatsCounter(name).Decrement(); } void WebKitClientImpl::incrementStatsCounter(const char* name) { - StatsCounter(name).Increment(); + base::StatsCounter(name).Increment(); } void WebKitClientImpl::traceEventBegin(const char* name, void* id, diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc index 2bc1494..3bceef0 100644 --- a/webkit/support/test_webkit_client.cc +++ b/webkit/support/test_webkit_client.cc @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "webkit/support/test_webkit_client.h" + #include "base/file_util.h" #include "base/path_service.h" #include "base/scoped_temp_dir.h" -#include "base/stats_counters.h" +#include "base/metrics/stats_counters.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "net/base/cookie_monster.h" @@ -37,7 +39,6 @@ #include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkitclient_impl.h" -#include "webkit/support/test_webkit_client.h" #include "webkit/support/weburl_loader_mock_factory.h" #include "webkit/tools/test_shell/mock_webclipboard_impl.h" #include "webkit/tools/test_shell/simple_appcache_system.h" @@ -62,7 +63,7 @@ using WebKit::WebScriptController; TestWebKitClient::TestWebKitClient(bool unit_test_mode) : unit_test_mode_(unit_test_mode) { - v8::V8::SetCounterFunction(StatsTable::FindLocation); + v8::V8::SetCounterFunction(base::StatsTable::FindLocation); WebKit::initialize(this); WebKit::setLayoutTestMode(true); diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 9213f6b..64af309 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,8 +16,8 @@ #endif #include "base/md5.h" #include "base/message_loop.h" +#include "base/metrics/stats_table.h" #include "base/path_service.h" -#include "base/stats_table.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "build/build_config.h" @@ -178,7 +178,7 @@ TestShell::~TestShell() { PlatformCleanUp(); - StatsTable *table = StatsTable::current(); + base::StatsTable *table = base::StatsTable::current(); if (dump_stats_table_on_exit_) { // Dump the stats table. printf("<stats>\n"); diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index ca49b66..f34dd21 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -19,7 +19,6 @@ #include "base/memory_debug.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/stats_table.h" #include "base/string16.h" #include "base/string_piece.h" #include "base/utf_string_conversions.h" diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 12b3b1c..a41ce74 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -14,10 +14,10 @@ #include "base/i18n/icu_util.h" #include "base/memory_debug.h" #include "base/message_loop.h" +#include "base/metrics/stats_table.h" #include "base/path_service.h" #include "base/process_util.h" #include "base/rand_util.h" -#include "base/stats_table.h" #include "base/string_number_conversions.h" #include "base/sys_info.h" #include "base/trace_event.h" @@ -273,10 +273,10 @@ int main(int argc, char* argv[]) { std::string stats_filename = kStatsFilePrefix + base::Uint64ToString(base::RandUint64() & 0xFFFFFFFFL); RemoveSharedMemoryFile(stats_filename); - StatsTable *table = new StatsTable(stats_filename, + base::StatsTable *table = new base::StatsTable(stats_filename, kStatsFileThreads, kStatsFileCounters); - StatsTable::set_current(table); + base::StatsTable::set_current(table); TestShell* shell; if (TestShell::CreateNewWindow(starting_url, &shell)) { @@ -398,7 +398,7 @@ int main(int argc, char* argv[]) { TestShell::CleanupLogging(); // Tear down shared StatsTable; prevents unit_tests from leaking it. - StatsTable::set_current(NULL); + base::StatsTable::set_current(NULL); delete table; RemoveSharedMemoryFile(stats_filename); diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc index 812d815..afae8f2 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.cc +++ b/webkit/tools/test_shell/test_shell_webkit_init.cc @@ -4,8 +4,8 @@ #include "webkit/tools/test_shell/test_shell_webkit_init.h" +#include "base/metrics/stats_counters.h" #include "base/path_service.h" -#include "base/stats_counters.h" #include "media/base/media.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" @@ -20,7 +20,7 @@ #endif TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) { - v8::V8::SetCounterFunction(StatsTable::FindLocation); + v8::V8::SetCounterFunction(base::StatsTable::FindLocation); WebKit::initialize(this); WebKit::setLayoutTestMode(layout_test_mode); |