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 /chrome/browser | |
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 'chrome/browser')
111 files changed, 252 insertions, 222 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc index dd6b14c..d5faec3 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.cc +++ b/chrome/browser/autocomplete/autocomplete_edit.cc @@ -7,7 +7,7 @@ #include <string> #include "base/basictypes.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc index 911f429..06e46d2 100644 --- a/chrome/browser/autocomplete/history_contents_provider.cc +++ b/chrome/browser/autocomplete/history_contents_provider.cc @@ -5,7 +5,7 @@ #include "chrome/browser/autocomplete/history_contents_provider.h" #include "base/callback.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model.h" diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc index 776c343..04d1c7e1 100644 --- a/chrome/browser/autocomplete/history_quick_provider.cc +++ b/chrome/browser/autocomplete/history_quick_provider.cc @@ -5,7 +5,6 @@ #include "chrome/browser/autocomplete/history_quick_provider.h" #include "base/basictypes.h" -#include "base/histogram.h" #include "base/i18n/word_iterator.h" #include "base/string_util.h" #include "base/logging.h" diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc index 234bed4..f86e5db 100644 --- a/chrome/browser/autocomplete/history_url_provider.cc +++ b/chrome/browser/autocomplete/history_url_provider.cc @@ -7,8 +7,8 @@ #include <algorithm> #include "base/basictypes.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/history.h" diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc index bc47eca..01b49eb 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc @@ -6,7 +6,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/browser/autofill/autofill_cc_infobar.h" #include "chrome/browser/autofill/autofill_manager.h" #include "chrome/browser/browser_list.h" diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc index 9230b86..abdf099 100644 --- a/chrome/browser/automation/automation_resource_message_filter.cc +++ b/chrome/browser/automation/automation_resource_message_filter.cc @@ -4,8 +4,8 @@ #include "chrome/browser/automation/automation_resource_message_filter.h" -#include "base/histogram.h" #include "base/path_service.h" +#include "base/metrics/histogram.h" #include "base/stl_util-inl.h" #include "chrome/browser/automation/url_request_automation_job.h" #include "chrome/browser/browser_thread.h" @@ -396,7 +396,7 @@ void AutomationResourceMessageFilter::OnGetFilteredInetHitCount( void AutomationResourceMessageFilter::OnRecordHistograms( const std::vector<std::string>& histogram_list) { for (size_t index = 0; index < histogram_list.size(); ++index) { - Histogram::DeserializeHistogramInfo(histogram_list[index]); + base::Histogram::DeserializeHistogramInfo(histogram_list[index]); } } diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc index 4debf38..6cbe433 100644 --- a/chrome/browser/bookmarks/bookmark_storage.cc +++ b/chrome/browser/bookmarks/bookmark_storage.cc @@ -6,7 +6,7 @@ #include "base/compiler_specific.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "chrome/browser/bookmarks/bookmark_codec.h" #include "chrome/browser/bookmarks/bookmark_model.h" diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index c8f3ceb..c4f0b2a 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -16,8 +16,8 @@ #include "app/l10n_util.h" #include "base/base_paths.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/string_util.h" #include "base/thread.h" diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 03afaaf..9a75983 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -12,11 +12,11 @@ #include "app/resource_bundle.h" #include "base/callback.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/i18n/number_formatting.h" +#include "base/metrics/histogram.h" +#include "base/metrics/stats_table.h" #include "base/path_service.h" #include "base/platform_thread.h" -#include "base/stats_table.h" #include "base/stringprintf.h" #include "base/string_number_conversions.h" #include "base/string_piece.h" @@ -403,7 +403,7 @@ std::string AboutHistograms(const std::string& query) { current_synchronizer->FetchRendererHistogramsSynchronously(wait_time); std::string data; - StatisticsRecorder::WriteHTMLGraph(query, &data); + base::StatisticsRecorder::WriteHTMLGraph(query, &data); return data; } @@ -428,7 +428,7 @@ std::string AboutStats() { // stats computations across runs. static DictionaryValue root; - StatsTable* table = StatsTable::current(); + base::StatsTable* table = base::StatsTable::current(); if (!table) return std::string(); diff --git a/chrome/browser/browser_child_process_host.cc b/chrome/browser/browser_child_process_host.cc index 2c8ba34..a317f26 100644 --- a/chrome/browser/browser_child_process_host.cc +++ b/chrome/browser/browser_child_process_host.cc @@ -6,8 +6,8 @@ #include "base/command_line.h" #include "base/file_path.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/process_util.h" #include "base/singleton.h" diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 6e5cd9a..e8d3945 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -11,7 +11,7 @@ #include "base/environment.h" #include "base/event_recorder.h" #include "base/file_path.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/scoped_ptr.h" #include "base/string_number_conversions.h" @@ -490,7 +490,7 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, chrome_browser_net::EnablePredictor(false); if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit)) - StatisticsRecorder::set_dump_on_exit(true); + base::StatisticsRecorder::set_dump_on_exit(true); if (command_line_.HasSwitch(switches::kRemoteShellPort)) { std::string port_str = diff --git a/chrome/browser/browser_list.cc b/chrome/browser/browser_list.cc index 0803db5..2652c1a 100644 --- a/chrome/browser/browser_list.cc +++ b/chrome/browser/browser_list.cc @@ -4,9 +4,9 @@ #include "chrome/browser/browser_list.h" -#include "base/histogram.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 7dce691..0cbcc66 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -14,10 +14,10 @@ #include "app/system_monitor.h" #include "base/at_exit.h" #include "base/command_line.h" -#include "base/field_trial.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/field_trial.h" +#include "base/metrics/histogram.h" #include "base/scoped_nsautorelease_pool.h" #include "base/path_service.h" #include "base/platform_thread.h" @@ -206,11 +206,11 @@ void BrowserMainParts::EarlyInitialization() { // on browsing. Too large a value might cause us to run into SYN flood detection // mechanisms. void BrowserMainParts::ConnectionFieldTrial() { - const FieldTrial::Probability kConnectDivisor = 100; - const FieldTrial::Probability kConnectProbability = 1; // 1% probability + const base::FieldTrial::Probability kConnectDivisor = 100; + const base::FieldTrial::Probability kConnectProbability = 1; // 1% prob. - scoped_refptr<FieldTrial> connect_trial = - new FieldTrial("ConnCountImpact", kConnectDivisor); + scoped_refptr<base::FieldTrial> connect_trial = + new base::FieldTrial("ConnCountImpact", kConnectDivisor); const int connect_5 = connect_trial->AppendGroup("conn_count_5", kConnectProbability); @@ -225,7 +225,7 @@ void BrowserMainParts::ConnectionFieldTrial() { // probability value will be assigned to all the other groups, while // preserving the remainder of the of probability space to the default value. const int connect_6 = connect_trial->AppendGroup("conn_count_6", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); const int connect_trial_group = connect_trial->group(); @@ -250,12 +250,12 @@ void BrowserMainParts::ConnectionFieldTrial() { // result in more ERR_CONNECT_RESETs, requiring one RTT to receive the RST // packet and possibly another RTT to re-establish the connection. void BrowserMainParts::SocketTimeoutFieldTrial() { - const FieldTrial::Probability kIdleSocketTimeoutDivisor = 100; + const base::FieldTrial::Probability kIdleSocketTimeoutDivisor = 100; // 1% probability for all experimental settings. - const FieldTrial::Probability kSocketTimeoutProbability = 1; + const base::FieldTrial::Probability kSocketTimeoutProbability = 1; - scoped_refptr<FieldTrial> socket_timeout_trial = - new FieldTrial("IdleSktToImpact", kIdleSocketTimeoutDivisor); + scoped_refptr<base::FieldTrial> socket_timeout_trial = + new base::FieldTrial("IdleSktToImpact", kIdleSocketTimeoutDivisor); const int socket_timeout_5 = socket_timeout_trial->AppendGroup("idle_timeout_5", @@ -268,7 +268,7 @@ void BrowserMainParts::SocketTimeoutFieldTrial() { kSocketTimeoutProbability); const int socket_timeout_60 = socket_timeout_trial->AppendGroup("idle_timeout_60", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); const int idle_to_trial_group = socket_timeout_trial->group(); @@ -286,12 +286,12 @@ void BrowserMainParts::SocketTimeoutFieldTrial() { } void BrowserMainParts::ProxyConnectionsFieldTrial() { - const FieldTrial::Probability kProxyConnectionsDivisor = 100; + const base::FieldTrial::Probability kProxyConnectionsDivisor = 100; // 25% probability - const FieldTrial::Probability kProxyConnectionProbability = 1; + const base::FieldTrial::Probability kProxyConnectionProbability = 1; - scoped_refptr<FieldTrial> proxy_connection_trial = - new FieldTrial("ProxyConnectionImpact", kProxyConnectionsDivisor); + scoped_refptr<base::FieldTrial> proxy_connection_trial = + new base::FieldTrial("ProxyConnectionImpact", kProxyConnectionsDivisor); // The number of max sockets per group cannot be greater than the max number // of sockets per proxy server. We tried using 8, and it can easily @@ -309,7 +309,7 @@ void BrowserMainParts::ProxyConnectionsFieldTrial() { // which allows for cleaner and quicker changes down the line if needed. const int proxy_connections_32 = proxy_connection_trial->AppendGroup("proxy_connections_32", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); const int proxy_connections_trial_group = proxy_connection_trial->group(); @@ -338,15 +338,16 @@ void BrowserMainParts::SpdyFieldTrial() { parsed_command_line().GetSwitchValueASCII(switches::kUseSpdy); net::HttpNetworkLayer::EnableSpdy(spdy_mode); } else { - const FieldTrial::Probability kSpdyDivisor = 100; - FieldTrial::Probability npnhttp_probability = 10; // 10% to preclude SPDY. - scoped_refptr<FieldTrial> trial = - new FieldTrial("SpdyImpact", kSpdyDivisor); + const base::FieldTrial::Probability kSpdyDivisor = 100; + // 10% to preclude SPDY. + base::FieldTrial::Probability npnhttp_probability = 10; + scoped_refptr<base::FieldTrial> trial = + new base::FieldTrial("SpdyImpact", kSpdyDivisor); // npn with only http support, no spdy. int npn_http_grp = trial->AppendGroup("npn_with_http", npnhttp_probability); // npn with spdy support. int npn_spdy_grp = trial->AppendGroup("npn_with_spdy", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); int trial_grp = trial->group(); if (trial_grp == npn_http_grp) { is_spdy_trial = true; @@ -368,14 +369,14 @@ void BrowserMainParts::PrefetchFieldTrial() { else if (parsed_command_line().HasSwitch(switches::kDisableContentPrefetch)) { ResourceDispatcherHost::set_is_prefetch_enabled(false); } else { - const FieldTrial::Probability kPrefetchDivisor = 1000; - const FieldTrial::Probability no_prefetch_probability = 500; - scoped_refptr<FieldTrial> trial = - new FieldTrial("Prefetch", kPrefetchDivisor); + const base::FieldTrial::Probability kPrefetchDivisor = 1000; + const base::FieldTrial::Probability no_prefetch_probability = 500; + scoped_refptr<base::FieldTrial> trial = + new base::FieldTrial("Prefetch", kPrefetchDivisor); trial->AppendGroup("ContentPrefetchDisabled", no_prefetch_probability); const int yes_prefetch_grp = trial->AppendGroup("ContentPrefetchEnabled", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); const int trial_grp = trial->group(); ResourceDispatcherHost::set_is_prefetch_enabled( trial_grp == yes_prefetch_grp); @@ -394,16 +395,17 @@ void BrowserMainParts::ConnectBackupJobsFieldTrial() { net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( false); } else { - const FieldTrial::Probability kConnectBackupJobsDivisor = 100; - // 50% probability. - const FieldTrial::Probability kConnectBackupJobsProbability = 1; // 1%. - scoped_refptr<FieldTrial> trial = new FieldTrial("ConnnectBackupJobs", - kConnectBackupJobsDivisor); + const base::FieldTrial::Probability kConnectBackupJobsDivisor = 100; + // 1% probability. + const base::FieldTrial::Probability kConnectBackupJobsProbability = 1; + scoped_refptr<base::FieldTrial> trial = + new base::FieldTrial("ConnnectBackupJobs", + kConnectBackupJobsDivisor); trial->AppendGroup("ConnectBackupJobsDisabled", kConnectBackupJobsProbability); const int connect_backup_jobs_enabled = trial->AppendGroup("ConnectBackupJobsEnabled", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); const int trial_group = trial->group(); net::internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( trial_group == connect_backup_jobs_enabled); @@ -942,7 +944,7 @@ int BrowserMain(const MainFunctionParams& parameters) { InitializeBrokerServices(parameters, parsed_command_line); // Initialize histogram statistics gathering system. - StatisticsRecorder statistics; + base::StatisticsRecorder statistics; PrefService* local_state = InitializeLocalState(parsed_command_line, is_first_run); @@ -1354,10 +1356,10 @@ int BrowserMain(const MainFunctionParams& parameters) { // Perform A/B test to measure global impact of SDCH support. // Set up a field trial to see what disabling SDCH does to latency of page // layout globally. - FieldTrial::Probability kSDCH_DIVISOR = 1000; - FieldTrial::Probability kSDCH_DISABLE_PROBABILITY = 1; // 0.1% probability. - scoped_refptr<FieldTrial> sdch_trial = - new FieldTrial("GlobalSdch", kSDCH_DIVISOR); + base::FieldTrial::Probability kSDCH_DIVISOR = 1000; + base::FieldTrial::Probability kSDCH_DISABLE_PROBABILITY = 1; // 0.1% prob. + scoped_refptr<base::FieldTrial> sdch_trial = + new base::FieldTrial("GlobalSdch", kSDCH_DIVISOR); // Use default of "" so that all domains are supported. std::string sdch_supported_domain(""); @@ -1368,7 +1370,7 @@ int BrowserMain(const MainFunctionParams& parameters) { sdch_trial->AppendGroup("global_disable_sdch", kSDCH_DISABLE_PROBABILITY); int sdch_enabled = sdch_trial->AppendGroup("global_enable_sdch", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); if (sdch_enabled != sdch_trial->group()) sdch_supported_domain = "never_enabled_sdch_for_any_domain"; } diff --git a/chrome/browser/browser_main.h b/chrome/browser/browser_main.h index 033fb1b..9154a4c 100644 --- a/chrome/browser/browser_main.h +++ b/chrome/browser/browser_main.h @@ -7,7 +7,7 @@ #pragma once #include "base/basictypes.h" -#include "base/field_trial.h" +#include "base/metrics/field_trial.h" #include "base/scoped_ptr.h" #include "base/tracked_objects.h" @@ -140,7 +140,7 @@ class BrowserMainParts { #endif // Statistical testing infrastructure for the entire browser. - FieldTrialList field_trial_; + base::FieldTrialList field_trial_; // Members initialized in |MainMessageLoopStart()| --------------------------- scoped_ptr<MessageLoop> main_message_loop_; diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index f9cc83c..9e7d411 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -10,7 +10,7 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/process_util.h" #include "base/string_number_conversions.h" diff --git a/chrome/browser/browser_trial.h b/chrome/browser/browser_trial.h index 9af5a27..c1a3290 100644 --- a/chrome/browser/browser_trial.h +++ b/chrome/browser/browser_trial.h @@ -9,7 +9,7 @@ #define CHROME_BROWSER_BROWSER_TRIAL_H_ #pragma once -#include "base/field_trial.h" +#include "base/basictypes.h" // Currently we use this as a name space, to hold static shared constants which // define current and past trials. diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm index f696e96..b4bb7cb 100644 --- a/chrome/browser/chrome_browser_application_mac.mm +++ b/chrome/browser/chrome_browser_application_mac.mm @@ -4,8 +4,8 @@ #import "chrome/browser/chrome_browser_application_mac.h" -#import "base/histogram.h" #import "base/logging.h" +#import "base/metrics/histogram.h" #import "base/scoped_nsobject.h" #import "base/sys_string_conversions.h" #import "chrome/app/breakpad_mac.h" diff --git a/chrome/browser/chrome_browser_application_mac_unittest.mm b/chrome/browser/chrome_browser_application_mac_unittest.mm index d5f26c5..c5a589c 100644 --- a/chrome/browser/chrome_browser_application_mac_unittest.mm +++ b/chrome/browser/chrome_browser_application_mac_unittest.mm @@ -4,10 +4,13 @@ #import <Cocoa/Cocoa.h> -#include "base/histogram.h" +#include "base/metrics/histogram.h" #import "chrome/browser/chrome_browser_application_mac.h" #include "testing/gtest/include/gtest/gtest.h" +using base::Histogram; +using base::StatisticsRecorder; + namespace chrome_browser_application_mac { // Generate an NSException with the given name. diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc index 3b48914..76d4756 100644 --- a/chrome/browser/chrome_plugin_host.cc +++ b/chrome/browser/chrome_plugin_host.cc @@ -10,8 +10,8 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/perftimer.h" #include "base/singleton.h" diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc index 8a52e39..97172be 100644 --- a/chrome/browser/chromeos/boot_times_loader.cc +++ b/chrome/browser/chromeos/boot_times_loader.cc @@ -9,8 +9,8 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/process_util.h" #include "base/singleton.h" #include "base/string_number_conversions.h" diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc index 6224f22..73e24d8 100644 --- a/chrome/browser/chromeos/external_metrics.cc +++ b/chrome/browser/chromeos/external_metrics.cc @@ -15,7 +15,7 @@ #include "base/basictypes.h" #include "base/eintr_wrapper.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/perftimer.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" @@ -91,8 +91,8 @@ void ExternalMetrics::RecordHistogram(const char* histogram_data) { } // Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram // instance and thus only work if |name| is constant. - scoped_refptr<Histogram> counter = Histogram::FactoryGet( - name, min, max, nbuckets, Histogram::kUmaTargetedHistogramFlag); + scoped_refptr<base::Histogram> counter = base::Histogram::FactoryGet( + name, min, max, nbuckets, base::Histogram::kUmaTargetedHistogramFlag); counter->Add(sample); } @@ -106,8 +106,8 @@ void ExternalMetrics::RecordLinearHistogram(const char* histogram_data) { } // Do not use the UMA_HISTOGRAM_... macros here. They cache the Histogram // instance and thus only work if |name| is constant. - scoped_refptr<Histogram> counter = LinearHistogram::FactoryGet( - name, 1, max, max + 1, Histogram::kUmaTargetedHistogramFlag); + scoped_refptr<base::Histogram> counter = base::LinearHistogram::FactoryGet( + name, 1, max, max + 1, base::Histogram::kUmaTargetedHistogramFlag); counter->Add(sample); } diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc index e0d799f..38d1cdf 100644 --- a/chrome/browser/chromeos/external_protocol_dialog.cc +++ b/chrome/browser/chromeos/external_protocol_dialog.cc @@ -6,7 +6,7 @@ #include "app/l10n_util.h" #include "app/message_box_flags.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/external_protocol_handler.h" diff --git a/chrome/browser/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc index 8d9f4dd..c3b88d5 100644 --- a/chrome/browser/chromeos/offline/offline_load_page.cc +++ b/chrome/browser/chromeos/offline/offline_load_page.cc @@ -6,8 +6,8 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/histogram.h" #include "base/i18n/rtl.h" +#include "base/metrics/histogram.h" #include "base/string_piece.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm index cbd18fc..a5288c2 100644 --- a/chrome/browser/cocoa/download_item_controller.mm +++ b/chrome/browser/cocoa/download_item_controller.mm @@ -7,8 +7,8 @@ #include "app/l10n_util_mac.h" #include "app/resource_bundle.h" #include "app/text_elider.h" -#include "base/histogram.h" #include "base/mac_util.h" +#include "base/metrics/histogram.h" #include "base/string16.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" diff --git a/chrome/browser/cocoa/external_protocol_dialog.mm b/chrome/browser/cocoa/external_protocol_dialog.mm index 3a7849a..0513ae0 100644 --- a/chrome/browser/cocoa/external_protocol_dialog.mm +++ b/chrome/browser/cocoa/external_protocol_dialog.mm @@ -5,8 +5,8 @@ #import "chrome/browser/cocoa/external_protocol_dialog.h" #include "app/l10n_util_mac.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/cocoa/objc_method_swizzle.mm b/chrome/browser/cocoa/objc_method_swizzle.mm index 4471efc..433bc66 100644 --- a/chrome/browser/cocoa/objc_method_swizzle.mm +++ b/chrome/browser/cocoa/objc_method_swizzle.mm @@ -4,7 +4,6 @@ #import "chrome/browser/cocoa/objc_method_swizzle.h" -#import "base/histogram.h" #import "base/logging.h" #import "base/scoped_nsobject.h" #import "chrome/app/breakpad_mac.h" diff --git a/chrome/browser/cocoa/translate/translate_infobar_base.mm b/chrome/browser/cocoa/translate/translate_infobar_base.mm index b396de8..bdc34f0 100644 --- a/chrome/browser/cocoa/translate/translate_infobar_base.mm +++ b/chrome/browser/cocoa/translate/translate_infobar_base.mm @@ -6,9 +6,9 @@ #import "chrome/browser/cocoa/translate/translate_infobar_base.h" #include "app/l10n_util.h" -#include "base/histogram.h" -#include "base/logging.h" // for NOTREACHED() +#include "base/logging.h" #include "base/mac_util.h" +#include "base/metrics/histogram.h" #include "base/sys_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" #import "chrome/browser/cocoa/hover_close_button.h" diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc index 15c758a..5030301 100644 --- a/chrome/browser/diagnostics/sqlite_diagnostics.cc +++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc @@ -8,8 +8,8 @@ #include "app/sql/diagnostic_error_delegate.h" #include "app/sql/statement.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/singleton.h" #include "base/string_number_conversions.h" diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index e96f1e6..e5b5a12 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -11,8 +11,8 @@ #include "app/l10n_util.h" #include "base/callback.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/i18n/rtl.h" +#include "base/metrics/histogram.h" #include "base/singleton.h" #include "base/string_number_conversions.h" #include "base/thread.h" diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index f91c259..b35d58c 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -9,9 +9,9 @@ #include "app/keyboard_codes.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/histogram.h" #include "base/message_loop.h" #include "base/singleton.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" diff --git a/chrome/browser/extensions/extension_metrics_apitest.cc b/chrome/browser/extensions/extension_metrics_apitest.cc index 5a91e9f..ee4761c 100644 --- a/chrome/browser/extensions/extension_metrics_apitest.cc +++ b/chrome/browser/extensions/extension_metrics_apitest.cc @@ -4,7 +4,7 @@ #include <map> -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_switches.h" @@ -29,20 +29,20 @@ struct RecordedUserAction { // updated. struct RecordedHistogram { const char* name; // base name of metric without extension id. - Histogram::ClassType type; + base::Histogram::ClassType type; int min; int max; size_t buckets; } g_histograms[] = { - {"test.h.1", Histogram::HISTOGRAM, 1, 100, 50}, // custom - {"test.h.2", Histogram::LINEAR_HISTOGRAM, 1, 200, 50}, // custom - {"test.h.3", Histogram::LINEAR_HISTOGRAM, 1, 101, 102}, // percentage - {"test.time", Histogram::HISTOGRAM, 1, 10000, 50}, - {"test.medium.time", Histogram::HISTOGRAM, 1, 180000, 50}, - {"test.long.time", Histogram::HISTOGRAM, 1, 3600000, 50}, - {"test.count", Histogram::HISTOGRAM, 1, 1000000, 50}, - {"test.medium.count", Histogram::HISTOGRAM, 1, 10000, 50}, - {"test.small.count", Histogram::HISTOGRAM, 1, 100, 50}, + {"test.h.1", base::Histogram::HISTOGRAM, 1, 100, 50}, // custom + {"test.h.2", base::Histogram::LINEAR_HISTOGRAM, 1, 200, 50}, // custom + {"test.h.3", base::Histogram::LINEAR_HISTOGRAM, 1, 101, 102}, // percentage + {"test.time", base::Histogram::HISTOGRAM, 1, 10000, 50}, + {"test.medium.time", base::Histogram::HISTOGRAM, 1, 180000, 50}, + {"test.long.time", base::Histogram::HISTOGRAM, 1, 3600000, 50}, + {"test.count", base::Histogram::HISTOGRAM, 1, 1000000, 50}, + {"test.medium.count", base::Histogram::HISTOGRAM, 1, 10000, 50}, + {"test.small.count", base::Histogram::HISTOGRAM, 1, 100, 50}, }; // Build the full name of a metrics for the given extension. Each metric @@ -110,8 +110,8 @@ void UserActionObserver::ValidateUserActions(const Extension* extension, void ValidateHistograms(const Extension* extension, const RecordedHistogram* recorded, int count) { - StatisticsRecorder::Histograms histograms; - StatisticsRecorder::GetHistograms(&histograms); + base::StatisticsRecorder::Histograms histograms; + base::StatisticsRecorder::GetHistograms(&histograms); // Code other than the tests tun here will record some histogram values, but // we will ignore those. This function validates that all the histogram we @@ -123,7 +123,7 @@ void ValidateHistograms(const Extension* extension, size_t j = 0; for (j = 0; j < histograms.size(); ++j) { - scoped_refptr<Histogram> histogram(histograms[j]); + scoped_refptr<base::Histogram> histogram(histograms[j]); if (name == histogram->histogram_name()) { EXPECT_EQ(r.type, histogram->histogram_type()); diff --git a/chrome/browser/extensions/extension_metrics_module.cc b/chrome/browser/extensions/extension_metrics_module.cc index 0f0ab14..a1815f2 100644 --- a/chrome/browser/extensions/extension_metrics_module.cc +++ b/chrome/browser/extensions/extension_metrics_module.cc @@ -4,11 +4,14 @@ #include "chrome/browser/extensions/extension_metrics_module.h" +#include "base/metrics/histogram.h" #include "base/values.h" -#include "base/histogram.h" #include "chrome/common/extensions/extension.h" #include "chrome/browser/metrics/user_metrics.h" +using base::Histogram; +using base::LinearHistogram; + namespace { // Build the full name of a metrics for the given extension. Each metric diff --git a/chrome/browser/extensions/extension_metrics_module.h b/chrome/browser/extensions/extension_metrics_module.h index f7a91dc..523acc0 100644 --- a/chrome/browser/extensions/extension_metrics_module.h +++ b/chrome/browser/extensions/extension_metrics_module.h @@ -8,7 +8,7 @@ #include <string> -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/browser/extensions/extension_function.h" class MetricsRecordUserActionFunction : public SyncExtensionFunction { @@ -19,8 +19,9 @@ class MetricsRecordUserActionFunction : public SyncExtensionFunction { class MetricsHistogramHelperFunction : public SyncExtensionFunction { protected: bool GetNameAndSample(std::string* name, int* sample); - virtual bool RecordValue(const std::string& name, Histogram::ClassType type, - int min, int max, size_t buckets, int sample); + virtual bool RecordValue(const std::string& name, + base::Histogram::ClassType type, + int min, int max, size_t buckets, int sample); }; class MetricsRecordValueFunction : public MetricsHistogramHelperFunction { diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index da669c6..52a4b4fe 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/rand_util.h" #include "base/sha2.h" #include "base/stl_util-inl.h" diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 693779b7..3c65525 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/command_line.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/stl_util-inl.h" #include "base/string16.h" #include "base/string_number_conversions.h" diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc index 5da78ca1..63d3093 100644 --- a/chrome/browser/gtk/download_item_gtk.cc +++ b/chrome/browser/gtk/download_item_gtk.cc @@ -10,7 +10,7 @@ #include "app/text_elider.h" #include "base/basictypes.h" #include "base/callback.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/time.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/gtk/external_protocol_dialog_gtk.cc b/chrome/browser/gtk/external_protocol_dialog_gtk.cc index 2819fbb..f59a26e 100644 --- a/chrome/browser/gtk/external_protocol_dialog_gtk.cc +++ b/chrome/browser/gtk/external_protocol_dialog_gtk.cc @@ -9,7 +9,7 @@ #include <string> #include "app/l10n_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/message_loop.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 286ddb5..4b37ccd 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -9,7 +9,7 @@ #include "base/command_line.h" #include "base/compiler_specific.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/message_loop.h" #include "base/scoped_ptr.h" #include "base/scoped_vector.h" diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc index 4661814..56ee054 100644 --- a/chrome/browser/history/history_database.cc +++ b/chrome/browser/history/history_database.cc @@ -13,7 +13,7 @@ #if defined(OS_MACOSX) #include "base/mac_util.h" #endif -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/rand_util.h" #include "base/string_util.h" #include "chrome/browser/diagnostics/sqlite_diagnostics.h" diff --git a/chrome/browser/history/in_memory_database.cc b/chrome/browser/history/in_memory_database.cc index a6a9a6f..3227a7a 100644 --- a/chrome/browser/history/in_memory_database.cc +++ b/chrome/browser/history/in_memory_database.cc @@ -5,8 +5,8 @@ #include "chrome/browser/history/in_memory_database.h" #include "base/file_path.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "build/build_config.h" diff --git a/chrome/browser/history/in_memory_history_backend.cc b/chrome/browser/history/in_memory_history_backend.cc index 7084aa1..6827a78 100644 --- a/chrome/browser/history/in_memory_history_backend.cc +++ b/chrome/browser/history/in_memory_history_backend.cc @@ -5,7 +5,7 @@ #include "chrome/browser/history/in_memory_history_backend.h" #include "base/command_line.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc index 71c801f..7454681 100644 --- a/chrome/browser/history/text_database.cc +++ b/chrome/browser/history/text_database.cc @@ -11,8 +11,8 @@ #include "app/sql/statement.h" #include "app/sql/transaction.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc index 99f068ea..c23158e 100644 --- a/chrome/browser/history/text_database_manager.cc +++ b/chrome/browser/history/text_database_manager.cc @@ -6,7 +6,7 @@ #include "base/compiler_specific.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/string_util.h" diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc index e1ac790..a9a99b0 100644 --- a/chrome/browser/jankometer.cc +++ b/chrome/browser/jankometer.cc @@ -8,10 +8,10 @@ #include "base/basictypes.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" +#include "base/metrics/stats_counters.h" #include "base/ref_counted.h" -#include "base/stats_counters.h" #include "base/string_util.h" #include "base/thread.h" #include "base/time.h" @@ -102,10 +102,10 @@ class JankObserverHelper { TimeDelta queueing_time_; // Counters for the two types of jank we measure. - StatsCounter slow_processing_counter_; // Messages with long processing time. - StatsCounter queueing_delay_counter_; // Messages with long queueing delay. - scoped_refptr<Histogram> process_times_; // Time spent processing task. - scoped_refptr<Histogram> total_times_; // Total queueing plus processing. + base::StatsCounter slow_processing_counter_; // Msgs w/ long proc time. + base::StatsCounter queueing_delay_counter_; // Msgs w/ long queueing delay. + scoped_refptr<base::Histogram> process_times_; // Time spent proc. task. + scoped_refptr<base::Histogram> total_times_; // Total queueing plus proc. JankWatchdog total_time_watchdog_; // Watching for excessive total_time. DISALLOW_COPY_AND_ASSIGN(JankObserverHelper); @@ -119,12 +119,12 @@ JankObserverHelper::JankObserverHelper( slow_processing_counter_(std::string("Chrome.SlowMsg") + thread_name), queueing_delay_counter_(std::string("Chrome.DelayMsg") + thread_name), total_time_watchdog_(excessive_duration, thread_name, watchdog_enable) { - process_times_ = Histogram::FactoryGet( + process_times_ = base::Histogram::FactoryGet( std::string("Chrome.ProcMsgL ") + thread_name, - 1, 3600000, 50, Histogram::kUmaTargetedHistogramFlag); - total_times_ = Histogram::FactoryGet( + 1, 3600000, 50, base::Histogram::kUmaTargetedHistogramFlag); + total_times_ = base::Histogram::FactoryGet( std::string("Chrome.TotalMsgL ") + thread_name, - 1, 3600000, 50, Histogram::kUmaTargetedHistogramFlag); + 1, 3600000, 50, base::Histogram::kUmaTargetedHistogramFlag); } JankObserverHelper::~JankObserverHelper() {} diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index 5bfbf1a..6c1ea77 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc @@ -5,7 +5,7 @@ #include "chrome/browser/memory_details.h" #include "base/file_version_info.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/process_util.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/metrics/histogram_synchronizer.cc b/chrome/browser/metrics/histogram_synchronizer.cc index 288d552..3311bb5 100644 --- a/chrome/browser/metrics/histogram_synchronizer.cc +++ b/chrome/browser/metrics/histogram_synchronizer.cc @@ -4,7 +4,7 @@ #include "chrome/browser/metrics/histogram_synchronizer.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/thread.h" #include "chrome/browser/browser_thread.h" @@ -140,7 +140,7 @@ void HistogramSynchronizer::DeserializeHistogramList( for (std::vector<std::string>::const_iterator it = histograms.begin(); it < histograms.end(); ++it) { - Histogram::DeserializeHistogramInfo(*it); + base::Histogram::DeserializeHistogramInfo(*it); } // Record that we have received a histogram from renderer process. diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index e4c9a12..2687eba 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -160,8 +160,8 @@ #include "base/base64.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/md5.h" +#include "base/metrics/histogram.h" #include "base/rand_util.h" #include "base/string_number_conversions.h" #include "base/thread.h" diff --git a/chrome/browser/net/preconnect.cc b/chrome/browser/net/preconnect.cc index a799f66..6780ade 100644 --- a/chrome/browser/net/preconnect.cc +++ b/chrome/browser/net/preconnect.cc @@ -4,8 +4,8 @@ #include "chrome/browser/net/preconnect.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "chrome/browser/profile.h" #include "chrome/browser/browser_thread.h" diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc index 10b19a4..fd55d2f 100644 --- a/chrome/browser/net/predictor.cc +++ b/chrome/browser/net/predictor.cc @@ -9,8 +9,7 @@ #include <sstream> #include "base/compiler_specific.h" -#include "base/histogram.h" -#include "base/stats_counters.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/time.h" #include "base/values.h" diff --git a/chrome/browser/net/predictor_api.cc b/chrome/browser/net/predictor_api.cc index 23f54f0..a1270dc 100644 --- a/chrome/browser/net/predictor_api.cc +++ b/chrome/browser/net/predictor_api.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 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. @@ -7,8 +7,8 @@ #include <map> #include <string> +#include "base/metrics/field_trial.h" #include "base/singleton.h" -#include "base/stats_counters.h" #include "base/stl_util-inl.h" #include "base/string_number_conversions.h" #include "base/thread.h" @@ -506,11 +506,11 @@ PredictorInit::PredictorInit(PrefService* user_prefs, DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Set up a field trial to see what disabling DNS pre-resolution does to // latency of page loads. - FieldTrial::Probability kDivisor = 1000; + base::FieldTrial::Probability kDivisor = 1000; // For each option (i.e., non-default), we have a fixed probability. - FieldTrial::Probability kProbabilityPerGroup = 1; // 0.1% probability. + base::FieldTrial::Probability kProbabilityPerGroup = 1; // 0.1% probability. - trial_ = new FieldTrial("DnsImpact", kDivisor); + trial_ = new base::FieldTrial("DnsImpact", kDivisor); // First option is to disable prefetching completely. int disabled_prefetch = trial_->AppendGroup("disabled_prefetch", @@ -546,7 +546,7 @@ PredictorInit::PredictorInit(PrefService* user_prefs, "max_6 concurrent_prefetch", kProbabilityPerGroup); trial_->AppendGroup("default_enabled_prefetch", - FieldTrial::kAllRemainingProbability); + base::FieldTrial::kAllRemainingProbability); // We will register the incognito observer regardless of whether prefetching // is enabled, as it is also used to clear the host cache. @@ -585,5 +585,7 @@ PredictorInit::PredictorInit(PrefService* user_prefs, } } +PredictorInit::~PredictorInit() { +} } // namespace chrome_browser_net diff --git a/chrome/browser/net/predictor_api.h b/chrome/browser/net/predictor_api.h index 062a2a6..3e04e11 100644 --- a/chrome/browser/net/predictor_api.h +++ b/chrome/browser/net/predictor_api.h @@ -16,11 +16,14 @@ #include <string> #include <vector> -#include "base/field_trial.h" #include "base/ref_counted.h" #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/net/predictor.h" +namespace base { +class FieldTrial; +} + class PrefService; namespace chrome_browser_net { @@ -90,10 +93,11 @@ class PredictorInit { PredictorInit(PrefService* user_prefs, PrefService* local_state, bool preconnect_enabled); + ~PredictorInit(); private: // Maintain a field trial instance when we do A/B testing. - scoped_refptr<FieldTrial> trial_; + scoped_refptr<base::FieldTrial> trial_; DISALLOW_COPY_AND_ASSIGN(PredictorInit); }; diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.cc b/chrome/browser/net/sqlite_persistent_cookie_store.cc index 83fa6fd..003c302 100644 --- a/chrome/browser/net/sqlite_persistent_cookie_store.cc +++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc @@ -10,8 +10,8 @@ #include "app/sql/transaction.h" #include "base/basictypes.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/string_util.h" diff --git a/chrome/browser/net/url_info.cc b/chrome/browser/net/url_info.cc index 994cfe7..cbf35db 100644 --- a/chrome/browser/net/url_info.cc +++ b/chrome/browser/net/url_info.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 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. @@ -9,10 +9,9 @@ #include <algorithm> #include <string> -#include "base/field_trial.h" #include "base/format_macros.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" using base::Time; @@ -110,9 +109,10 @@ void UrlInfo::RemoveFromQueue() { } // Make a custom linear histogram for the region from 0 to boundary. const size_t kBucketCount = 52; - static scoped_refptr<Histogram> histogram = LinearHistogram::FactoryTimeGet( - "DNS.QueueRecycledUnder2", TimeDelta(), kBoundary, kBucketCount, - Histogram::kUmaTargetedHistogramFlag); + static scoped_refptr<base::Histogram> histogram = + base::LinearHistogram::FactoryTimeGet( + "DNS.QueueRecycledUnder2", TimeDelta(), kBoundary, kBucketCount, + base::Histogram::kUmaTargetedHistogramFlag); histogram->AddTime(queue_duration_); } diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc index 692d4d0..e09febc 100644 --- a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc +++ b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc @@ -6,8 +6,8 @@ #include "base/command_line.h" #include "base/compiler_specific.h" -#include "base/field_trial.h" #include "base/message_loop.h" +#include "base/metrics/field_trial.h" #include "base/task.h" #include "base/string_util.h" #include "chrome/browser/browser_thread.h" @@ -28,10 +28,12 @@ static scoped_refptr<WebSocketExperimentRunner> runner; void WebSocketExperimentRunner::Start() { DCHECK(!runner.get()); - scoped_refptr<FieldTrial> trial = new FieldTrial("WebSocketExperiment", 1000); + scoped_refptr<base::FieldTrial> trial = + new base::FieldTrial("WebSocketExperiment", 1000); trial->AppendGroup("active", 5); // 0.5% in active group. - bool run_experiment = (trial->group() != FieldTrial::kNotParticipating); + bool run_experiment = + (trial->group() != base::FieldTrial::kNotParticipating); #ifndef NDEBUG const CommandLine& command_line = *CommandLine::ForCurrentProcess(); std::string experiment_host = command_line.GetSwitchValueASCII( diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h index 16b20f0..785b5cf 100644 --- a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h +++ b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h @@ -16,7 +16,6 @@ #pragma once #include "base/basictypes.h" -#include "base/histogram.h" #include "base/linked_ptr.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc b/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc index cc7929c..6279615 100644 --- a/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc +++ b/chrome/browser/net/websocket_experiment/websocket_experiment_task.cc @@ -5,7 +5,7 @@ #include "chrome/browser/net/websocket_experiment/websocket_experiment_task.h" #include "base/hash_tables.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/profile.h" #include "chrome/common/net/url_request_context_getter.h" @@ -14,6 +14,9 @@ #include "net/base/net_errors.h" #include "net/websockets/websocket.h" +using base::Histogram; +using base::LinearHistogram; + namespace chrome_browser_net_websocket_experiment { static std::string GetProtocolVersionName( diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc index 4df30e9..351485f 100644 --- a/chrome/browser/notifications/desktop_notification_service.cc +++ b/chrome/browser/notifications/desktop_notification_service.cc @@ -6,7 +6,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/thread.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_child_process_host.h" diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc index 1a91efe..e1ab84c 100644 --- a/chrome/browser/omnibox_search_hint.cc +++ b/chrome/browser/omnibox_search_hint.cc @@ -7,7 +7,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/command_line.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/task.h" #include "chrome/browser/autocomplete/autocomplete_edit.h" #include "chrome/browser/autocomplete/autocomplete_edit_view.h" diff --git a/chrome/browser/password_manager/login_database.cc b/chrome/browser/password_manager/login_database.cc index 700dd3f..a7c26b4 100644 --- a/chrome/browser/password_manager/login_database.cc +++ b/chrome/browser/password_manager/login_database.cc @@ -11,8 +11,8 @@ #include "app/sql/transaction.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc index e268317..977806d 100644 --- a/chrome/browser/password_manager/password_form_manager.cc +++ b/chrome/browser/password_manager/password_form_manager.cc @@ -6,7 +6,7 @@ #include <algorithm> -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_split.h" #include "base/string_util.h" #include "chrome/browser/password_manager/password_manager.h" diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc index eb1e0e3..80b3d38 100644 --- a/chrome/browser/prefs/pref_service.cc +++ b/chrome/browser/prefs/pref_service.cc @@ -11,9 +11,9 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/stl_util-inl.h" #include "base/string_number_conversions.h" #include "base/string_util.h" diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc index e2ea94a..491008c 100644 --- a/chrome/browser/profile_impl.cc +++ b/chrome/browser/profile_impl.cc @@ -9,7 +9,7 @@ #include "base/environment.h" #include "base/file_path.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/scoped_ptr.h" #include "base/string_number_conversions.h" diff --git a/chrome/browser/renderer_host/audio_renderer_host.cc b/chrome/browser/renderer_host/audio_renderer_host.cc index af63515..9493799 100644 --- a/chrome/browser/renderer_host/audio_renderer_host.cc +++ b/chrome/browser/renderer_host/audio_renderer_host.cc @@ -4,8 +4,8 @@ #include "chrome/browser/renderer_host/audio_renderer_host.h" -#include "base/histogram.h" #include "base/lock.h" +#include "base/metrics/histogram.h" #include "base/process.h" #include "base/shared_memory.h" #include "base/sys_info.h" diff --git a/chrome/browser/renderer_host/backing_store_x.cc b/chrome/browser/renderer_host/backing_store_x.cc index f2704c8..a79a8fc 100644 --- a/chrome/browser/renderer_host/backing_store_x.cc +++ b/chrome/browser/renderer_host/backing_store_x.cc @@ -22,8 +22,8 @@ #include "app/x11_util.h" #include "app/x11_util_internal.h" #include "base/compiler_specific.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "gfx/rect.h" diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 4c152e06..65172c8 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -17,9 +17,9 @@ #include "app/app_switches.h" #include "base/command_line.h" -#include "base/field_trial.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/field_trial.h" +#include "base/metrics/histogram.h" #include "base/platform_file.h" #include "base/stl_util-inl.h" #include "base/string_util.h" @@ -490,11 +490,11 @@ void BrowserRenderProcessHost::AppendRendererCommandLine( const std::string locale = g_browser_process->GetApplicationLocale(); command_line->AppendSwitchASCII(switches::kLang, locale); - // If we run FieldTrials, we want to pass to their state to the renderer so + // If we run base::FieldTrials, we want to pass to their state to the renderer so // that it can act in accordance with each state, or record histograms - // relating to the FieldTrial states. + // relating to the base::FieldTrial states. std::string field_trial_states; - FieldTrialList::StatesToString(&field_trial_states); + base::FieldTrialList::StatesToString(&field_trial_states); if (!field_trial_states.empty()) { command_line->AppendSwitchASCII(switches::kForceFieldTestNameAndValue, field_trial_states); diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc index 78389f0..a19d3c3 100644 --- a/chrome/browser/renderer_host/buffered_resource_handler.cc +++ b/chrome/browser/renderer_host/buffered_resource_handler.cc @@ -6,8 +6,8 @@ #include <vector> -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/renderer_host/download_throttling_resource_handler.h" @@ -29,19 +29,21 @@ namespace { void RecordSnifferMetrics(bool sniffing_blocked, bool we_would_like_to_sniff, const std::string& mime_type) { - static scoped_refptr<Histogram> nosniff_usage = BooleanHistogram::FactoryGet( - "nosniff.usage", Histogram::kUmaTargetedHistogramFlag); + static scoped_refptr<base::Histogram> nosniff_usage = + base::BooleanHistogram::FactoryGet( + "nosniff.usage", base::Histogram::kUmaTargetedHistogramFlag); nosniff_usage->AddBoolean(sniffing_blocked); if (sniffing_blocked) { - static scoped_refptr<Histogram> nosniff_otherwise = - BooleanHistogram::FactoryGet("nosniff.otherwise", - Histogram::kUmaTargetedHistogramFlag); + static scoped_refptr<base::Histogram> nosniff_otherwise = + base::BooleanHistogram::FactoryGet( + "nosniff.otherwise", base::Histogram::kUmaTargetedHistogramFlag); nosniff_otherwise->AddBoolean(we_would_like_to_sniff); - static scoped_refptr<Histogram> nosniff_empty_mime_type = - BooleanHistogram::FactoryGet("nosniff.empty_mime_type", - Histogram::kUmaTargetedHistogramFlag); + static scoped_refptr<base::Histogram> nosniff_empty_mime_type = + base::BooleanHistogram::FactoryGet( + "nosniff.empty_mime_type", + base::Histogram::kUmaTargetedHistogramFlag); nosniff_empty_mime_type->AddBoolean(mime_type.empty()); } } diff --git a/chrome/browser/renderer_host/offline_resource_handler.cc b/chrome/browser/renderer_host/offline_resource_handler.cc index dafa911..68a036d 100644 --- a/chrome/browser/renderer_host/offline_resource_handler.cc +++ b/chrome/browser/renderer_host/offline_resource_handler.cc @@ -6,8 +6,8 @@ #include <vector> -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/singleton.h" #include "base/string_util.h" #include "chrome/browser/browser_thread.h" diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index c91671f..3781bed 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -11,7 +11,7 @@ #include "base/command_line.h" #include "base/i18n/rtl.h" #include "base/json/json_reader.h" -#include "base/stats_counters.h" +#include "base/metrics/stats_counters.h" #include "base/string_util.h" #include "base/time.h" #include "base/values.h" @@ -1145,7 +1145,7 @@ void RenderViewHost::OnMsgDidLoadResourceFromMemoryCache( const std::string& frame_origin, const std::string& main_frame_origin, const std::string& security_info) { - static StatsCounter cache("WebKit.CacheHit"); + static base::StatsCounter cache("WebKit.CacheHit"); cache.Increment(); RenderViewHostDelegate::Resource* resource_delegate = diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 684c7ef..7d4aa79f 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -7,8 +7,8 @@ #include "app/keyboard_codes.h" #include "base/auto_reset.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "chrome/browser/accessibility/browser_accessibility_state.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/renderer_host/backing_store.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index c69397d..5f4a843 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -22,8 +22,8 @@ #include "app/x11_util.h" #include "base/command_line.h" #include "base/logging.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/string_number_conversions.h" #include "base/time.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index e6a6ba6..ce0f8c0 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -10,8 +10,8 @@ #include "app/surface/io_surface_support_mac.h" #import "base/chrome_application_mac.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #import "base/scoped_nsautorelease_pool.h" #import "base/scoped_nsobject.h" #include "base/string_util.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc index 76f6cd6..25e8a88 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_views.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc @@ -11,9 +11,9 @@ #include "app/l10n_util.h" #include "app/x11_util.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/string_number_conversions.h" #include "base/task.h" #include "base/time.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 29d4174..0b66f0c 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -8,8 +8,8 @@ #include "app/l10n_util_win.h" #include "app/resource_bundle.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/i18n/rtl.h" +#include "base/metrics/histogram.h" #include "base/process_util.h" #include "base/scoped_comptr_win.h" #include "base/thread.h" diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 3faa6f8..a17b12b7 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -10,8 +10,8 @@ #include "base/logging.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/scoped_ptr.h" #include "base/shared_memory.h" #include "base/stl_util-inl.h" diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 1351962..d62f6d1 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -12,7 +12,7 @@ #endif #include "base/file_util.h" #include "base/file_path.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/process_util.h" #include "base/shared_memory.h" #include "base/thread.h" diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc index 04da747..88baa7b 100644 --- a/chrome/browser/renderer_host/web_cache_manager.cc +++ b/chrome/browser/renderer_host/web_cache_manager.cc @@ -7,7 +7,7 @@ #include <algorithm> #include "base/compiler_specific.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/singleton.h" #include "base/sys_info.h" #include "base/time.h" diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc index 52ccbace..d7ba1a8 100644 --- a/chrome/browser/safe_browsing/protocol_manager.cc +++ b/chrome/browser/safe_browsing/protocol_manager.cc @@ -8,8 +8,8 @@ #include "base/base64.h" #endif #include "base/environment.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/rand_util.h" #include "base/stl_util-inl.h" #include "base/string_util.h" diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc index 72d2554..df76d47 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database.cc @@ -6,12 +6,12 @@ #include "base/command_line.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" +#include "base/metrics/stats_counters.h" #include "base/time.h" #include "base/message_loop.h" #include "base/process_util.h" #include "base/sha2.h" -#include "base/stats_counters.h" #include "chrome/browser/safe_browsing/bloom_filter.h" #include "chrome/browser/safe_browsing/safe_browsing_database_bloom.h" #include "chrome/browser/safe_browsing/safe_browsing_store_file.h" diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc index 0c636ef..36a03c0 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc @@ -6,11 +6,11 @@ #include "base/auto_reset.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/message_loop.h" +#include "base/metrics/stats_counters.h" #include "base/process_util.h" #include "base/sha2.h" -#include "base/stats_counters.h" #include "base/string_util.h" #include "chrome/browser/safe_browsing/bloom_filter.h" #include "chrome/common/sqlite_compiled_statement.h" diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom_unittest.cc index 4359cc5..2032efd 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_bloom_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom_unittest.cc @@ -11,11 +11,11 @@ #include "base/format_macros.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/metrics/stats_counters.h" #include "base/path_service.h" #include "base/process_util.h" #include "base/scoped_temp_dir.h" #include "base/sha2.h" -#include "base/stats_counters.h" #include "base/string_util.h" #include "base/time.h" #include "chrome/browser/safe_browsing/protocol_parser.h" @@ -1093,7 +1093,7 @@ TEST_F(SafeBrowsingDatabaseBloomTest, DISABLED_SqliteCorruptionHandling) { namespace { void PrintStat(const char* name) { - int value = StatsTable::current()->GetCounterValue(name); + int value = base::StatsTable::current()->GetCounterValue(name); SB_DLOG(INFO) << StringPrintf("%s %d", name, value); } diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index d381d55..6407e53 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -10,11 +10,11 @@ #include "base/format_macros.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/metrics/stats_counters.h" #include "base/path_service.h" #include "base/process_util.h" #include "base/scoped_temp_dir.h" #include "base/sha2.h" -#include "base/stats_counters.h" #include "base/string_util.h" #include "base/time.h" #include "chrome/browser/safe_browsing/protocol_parser.h" @@ -1168,7 +1168,7 @@ TEST_F(SafeBrowsingDatabaseTest, DISABLED_FileCorruptionHandling) { namespace { void PrintStat(const char* name) { - int value = StatsTable::current()->GetCounterValue(name); + int value = base::StatsTable::current()->GetCounterValue(name); SB_DLOG(INFO) << StringPrintf("%s %d", name, value); } diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc index a5cec62..196cf0d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc @@ -5,7 +5,7 @@ #include "chrome/browser/safe_browsing/safe_browsing_store_file.h" #include "base/callback.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/md5.h" // TODO(shess): Remove after migration. diff --git a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc index 486d6f2..8deeff4 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc @@ -8,7 +8,7 @@ #include "base/callback.h" #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/common/sqlite_compiled_statement.h" diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc index 342c1f0..f5a0c39 100644 --- a/chrome/browser/sessions/session_backend.cc +++ b/chrome/browser/sessions/session_backend.cc @@ -7,7 +7,7 @@ #include <limits> #include "base/file_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/scoped_vector.h" #include "net/base/file_stream.h" diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 542d3e3..a430d56 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -10,8 +10,8 @@ #include "base/callback.h" #include "base/file_util.h" -#include "base/histogram.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/pickle.h" #include "base/scoped_vector.h" #include "base/thread.h" diff --git a/chrome/browser/spellchecker_mac.mm b/chrome/browser/spellchecker_mac.mm index 70db304..91d6f3e 100644 --- a/chrome/browser/spellchecker_mac.mm +++ b/chrome/browser/spellchecker_mac.mm @@ -10,8 +10,8 @@ #import <Cocoa/Cocoa.h> #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" -#include "base/histogram.h" #include "base/sys_string_conversions.h" #include "chrome/common/spellcheck_common.h" diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc index 9a1ba76..91d87c7 100644 --- a/chrome/browser/ssl/ssl_blocking_page.cc +++ b/chrome/browser/ssl/ssl_blocking_page.cc @@ -6,8 +6,8 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/histogram.h" #include "base/i18n/rtl.h" +#include "base/metrics/histogram.h" #include "base/string_piece.h" #include "base/utf_string_conversions.h" #include "base/values.h" diff --git a/chrome/browser/sync/glue/app_data_type_controller.cc b/chrome/browser/sync/glue/app_data_type_controller.cc index 8a86b1a..cb6cb54 100644 --- a/chrome/browser/sync/glue/app_data_type_controller.cc +++ b/chrome/browser/sync/glue/app_data_type_controller.cc @@ -4,7 +4,7 @@ #include "chrome/browser/sync/glue/app_data_type_controller.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc index b7ee19b..8c33872 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc @@ -2,14 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/autofill_data_type_controller.h" + #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/task.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/glue/autofill_change_processor.h" -#include "chrome/browser/sync/glue/autofill_data_type_controller.h" #include "chrome/browser/sync/glue/autofill_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.cc b/chrome/browser/sync/glue/bookmark_data_type_controller.cc index 1662d5d..093fc16 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller.cc +++ b/chrome/browser/sync/glue/bookmark_data_type_controller.cc @@ -2,14 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/bookmark_data_type_controller.h" + #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/glue/bookmark_change_processor.h" -#include "chrome/browser/sync/glue/bookmark_data_type_controller.h" #include "chrome/browser/sync/glue/bookmark_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/extension_data_type_controller.cc b/chrome/browser/sync/glue/extension_data_type_controller.cc index 2e3368b..d5b7900 100644 --- a/chrome/browser/sync/glue/extension_data_type_controller.cc +++ b/chrome/browser/sync/glue/extension_data_type_controller.cc @@ -4,8 +4,8 @@ #include "chrome/browser/sync/glue/extension_data_type_controller.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/sync/glue/password_data_type_controller.cc b/chrome/browser/sync/glue/password_data_type_controller.cc index 20d9ef6..095306a 100644 --- a/chrome/browser/sync/glue/password_data_type_controller.cc +++ b/chrome/browser/sync/glue/password_data_type_controller.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/password_data_type_controller.h" + +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/task.h" #include "base/time.h" @@ -10,7 +12,6 @@ #include "chrome/browser/password_manager/password_store.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/glue/password_change_processor.h" -#include "chrome/browser/sync/glue/password_data_type_controller.h" #include "chrome/browser/sync/glue/password_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/preference_data_type_controller.cc b/chrome/browser/sync/glue/preference_data_type_controller.cc index cb3fc6c7..f714ed1 100644 --- a/chrome/browser/sync/glue/preference_data_type_controller.cc +++ b/chrome/browser/sync/glue/preference_data_type_controller.cc @@ -2,12 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/preference_data_type_controller.h" + #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/sync/glue/preference_change_processor.h" -#include "chrome/browser/sync/glue/preference_data_type_controller.h" #include "chrome/browser/sync/glue/preference_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/session_data_type_controller.cc b/chrome/browser/sync/glue/session_data_type_controller.cc index 1e2a072..8b68972 100644 --- a/chrome/browser/sync/glue/session_data_type_controller.cc +++ b/chrome/browser/sync/glue/session_data_type_controller.cc @@ -2,12 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/session_data_type_controller.h" + +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/sync/glue/session_change_processor.h" -#include "chrome/browser/sync/glue/session_data_type_controller.h" #include "chrome/browser/sync/glue/session_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/session_data_type_controller.h b/chrome/browser/sync/glue/session_data_type_controller.h index 0dc56eb..ae815d4 100644 --- a/chrome/browser/sync/glue/session_data_type_controller.h +++ b/chrome/browser/sync/glue/session_data_type_controller.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "chrome/browser/sync/glue/data_type_controller.h" +#include "chrome/browser/sync/glue/session_model_associator.h" class ProfileSyncFactory; class ProfileSyncService; diff --git a/chrome/browser/sync/glue/theme_data_type_controller.cc b/chrome/browser/sync/glue/theme_data_type_controller.cc index ecad426..03cf3cd 100644 --- a/chrome/browser/sync/glue/theme_data_type_controller.cc +++ b/chrome/browser/sync/glue/theme_data_type_controller.cc @@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/theme_data_type_controller.h" + +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/time.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/glue/theme_change_processor.h" -#include "chrome/browser/sync/glue/theme_data_type_controller.h" #include "chrome/browser/sync/glue/theme_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.cc b/chrome/browser/sync/glue/typed_url_data_type_controller.cc index ca9f5cd..6fca194 100644 --- a/chrome/browser/sync/glue/typed_url_data_type_controller.cc +++ b/chrome/browser/sync/glue/typed_url_data_type_controller.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/histogram.h" +#include "chrome/browser/sync/glue/typed_url_data_type_controller.h" + +#include "base/metrics/histogram.h" #include "base/logging.h" #include "base/task.h" #include "base/time.h" @@ -10,7 +12,6 @@ #include "chrome/browser/history/history.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/glue/typed_url_change_processor.h" -#include "chrome/browser/sync/glue/typed_url_data_type_controller.h" #include "chrome/browser/sync/glue/typed_url_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_factory.h" diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.h b/chrome/browser/sync/glue/typed_url_data_type_controller.h index db28208..0301135 100644 --- a/chrome/browser/sync/glue/typed_url_data_type_controller.h +++ b/chrome/browser/sync/glue/typed_url_data_type_controller.h @@ -23,6 +23,10 @@ class Profile; class ProfileSyncFactory; class ProfileSyncService; +namespace history { +class HistoryBackend; +} + namespace browser_sync { class AssociatorInterface; diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index bad0859..ddaff62 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -10,8 +10,8 @@ #include "app/l10n_util.h" #include "base/callback.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/stl_util-inl.h" #include "base/string16.h" #include "base/string_util.h" diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc index 0f22e8c..9cef9768 100644 --- a/chrome/browser/sync/sync_setup_flow.cc +++ b/chrome/browser/sync/sync_setup_flow.cc @@ -6,9 +6,9 @@ #include "app/gfx/font_util.h" #include "base/callback.h" -#include "base/histogram.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/browser/sync/syncable/directory_backing_store.cc index abba0a6..c0036d3 100644 --- a/chrome/browser/sync/syncable/directory_backing_store.cc +++ b/chrome/browser/sync/syncable/directory_backing_store.cc @@ -14,8 +14,8 @@ #include "base/file_util.h" #include "base/hash_tables.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/stl_util-inl.h" #include "base/string_number_conversions.h" #include "base/string_util.h" diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 1b5af98..4dc7b11 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -9,8 +9,8 @@ #include "app/l10n_util.h" #include "base/command_line.h" -#include "base/histogram.h" #include "base/logging.h" +#include "base/metrics/histogram.h" #include "base/stl_util-inl.h" #include "base/string_util.h" #include "base/time.h" diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index ebf4756..0ed29a0 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -14,8 +14,8 @@ #include "app/text_elider.h" #include "base/auto_reset.h" #include "base/file_version_info.h" -#include "base/histogram.h" #include "base/i18n/rtl.h" +#include "base/metrics/histogram.h" #include "base/process_util.h" #include "base/string16.h" #include "base/string_util.h" diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc index 4d5826a..520faf4 100644 --- a/chrome/browser/tab_contents/thumbnail_generator.cc +++ b/chrome/browser/tab_contents/thumbnail_generator.cc @@ -7,7 +7,7 @@ #include <algorithm> #include <map> -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/time.h" #include "build/build_config.h" #include "chrome/browser/renderer_host/backing_store.h" diff --git a/chrome/browser/translate/languages_menu_model.cc b/chrome/browser/translate/languages_menu_model.cc index 93bd100..544410e 100644 --- a/chrome/browser/translate/languages_menu_model.cc +++ b/chrome/browser/translate/languages_menu_model.cc @@ -4,7 +4,7 @@ #include "chrome/browser/translate/languages_menu_model.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/browser/translate/translate_infobar_delegate.h" LanguagesMenuModel::LanguagesMenuModel( diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc index 56b707b..bb5b157 100644 --- a/chrome/browser/translate/options_menu_model.cc +++ b/chrome/browser/translate/options_menu_model.cc @@ -5,7 +5,7 @@ #include "chrome/browser/translate/options_menu_model.h" #include "app/l10n_util.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc index af73d11..6b27cd5 100644 --- a/chrome/browser/translate/translate_infobar_delegate.cc +++ b/chrome/browser/translate/translate_infobar_delegate.cc @@ -8,7 +8,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index df5db9e..b948a25 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -7,7 +7,7 @@ #include "app/resource_bundle.h" #include "base/command_line.h" #include "base/compiler_specific.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/string_split.h" #include "base/string_util.h" #include "chrome/browser/browser.h" diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc index 1f753e9..ebaa8916 100644 --- a/chrome/browser/views/download_item_view.cc +++ b/chrome/browser/views/download_item_view.cc @@ -11,8 +11,8 @@ #include "app/text_elider.h" #include "base/callback.h" #include "base/file_path.h" -#include "base/histogram.h" #include "base/i18n/rtl.h" +#include "base/metrics/histogram.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" diff --git a/chrome/browser/views/external_protocol_dialog.cc b/chrome/browser/views/external_protocol_dialog.cc index 9546f25..6dda2e3 100644 --- a/chrome/browser/views/external_protocol_dialog.cc +++ b/chrome/browser/views/external_protocol_dialog.cc @@ -6,7 +6,7 @@ #include "app/l10n_util.h" #include "app/message_box_flags.h" -#include "base/histogram.h" +#include "base/metrics/histogram.h" #include "base/registry.h" #include "base/string_util.h" #include "base/thread.h" diff --git a/chrome/browser/views/task_manager_view.cc b/chrome/browser/views/task_manager_view.cc index 452c5d9..a4d74c2 100644 --- a/chrome/browser/views/task_manager_view.cc +++ b/chrome/browser/views/task_manager_view.cc @@ -7,7 +7,7 @@ #include "app/l10n_util.h" #include "app/table_model_observer.h" #include "base/command_line.h" -#include "base/stats_table.h" +#include "base/metrics/stats_table.h" #include "base/utf_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/browser_list.h" @@ -384,7 +384,7 @@ void TaskManagerView::Init() { } void TaskManagerView::UpdateStatsCounters() { - StatsTable* stats = StatsTable::current(); + base::StatsTable* stats = base::StatsTable::current(); if (stats != NULL) { int max = stats->GetMaxCounters(); // skip the first row (it's header data) |