Index: chrome_frame/test/net/fake_external_tab.cc |
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc |
index 24007f2191c1a9900d9f6d2f2b3881963b3decae..46405087c91523cf155f72f6a38b8005b436e2e7 100644 |
--- a/chrome_frame/test/net/fake_external_tab.cc |
+++ b/chrome_frame/test/net/fake_external_tab.cc |
@@ -33,6 +33,7 @@ |
#include "chrome/browser/automation/automation_provider_list.h" |
#include "chrome/browser/chrome_content_browser_client.h" |
#include "chrome/browser/prefs/browser_prefs.h" |
+#include "chrome/browser/prefs/pref_registry_simple.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/prefs/proxy_config_dictionary.h" |
#include "chrome/browser/process_singleton.h" |
@@ -516,8 +517,13 @@ void FakeExternalTab::Initialize() { |
content::RenderProcessHost::SetRunRendererInProcess(true); |
- browser_process_->local_state()->RegisterBooleanPref( |
- prefs::kMetricsReportingEnabled, false); |
+ // TODO(joi): Registration should be done up front via browser_prefs.cc |
+ scoped_refptr<PrefRegistrySimple> registry = static_cast<PrefRegistrySimple*>( |
+ browser_process_->local_state()->DeprecatedGetPrefRegistry()); |
+ if (!browser_process_->local_state()->FindPreference( |
+ prefs::kMetricsReportingEnabled)) { |
+ registry->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); |
+ } |
} |
void FakeExternalTab::InitializePostThreadsCreated() { |