Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4540)

Unified Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome_frame/test/reliability/page_load_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome_frame/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698