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

Side by Side Diff: chrome/test/base/testing_browser_process.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | chrome/test/base/testing_pref_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/base/testing_browser_process.h" 5 #include "chrome/test/base/testing_browser_process.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return profile_manager_.get(); 89 return profile_manager_.get();
90 #endif 90 #endif
91 } 91 }
92 92
93 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { 93 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) {
94 #if !defined(OS_IOS) 94 #if !defined(OS_IOS)
95 profile_manager_.reset(profile_manager); 95 profile_manager_.reset(profile_manager);
96 #endif 96 #endif
97 } 97 }
98 98
99 PrefServiceSimple* TestingBrowserProcess::local_state() { 99 PrefService* TestingBrowserProcess::local_state() {
100 return local_state_; 100 return local_state_;
101 } 101 }
102 102
103 chrome_variations::VariationsService* 103 chrome_variations::VariationsService*
104 TestingBrowserProcess::variations_service() { 104 TestingBrowserProcess::variations_service() {
105 return NULL; 105 return NULL;
106 } 106 }
107 107
108 policy::BrowserPolicyConnector* 108 policy::BrowserPolicyConnector*
109 TestingBrowserProcess::browser_policy_connector() { 109 TestingBrowserProcess::browser_policy_connector() {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 #if !defined(OS_IOS) 337 #if !defined(OS_IOS)
338 bookmark_prompt_controller_.reset(controller); 338 bookmark_prompt_controller_.reset(controller);
339 #endif 339 #endif
340 } 340 }
341 341
342 void TestingBrowserProcess::SetSystemRequestContext( 342 void TestingBrowserProcess::SetSystemRequestContext(
343 net::URLRequestContextGetter* context_getter) { 343 net::URLRequestContextGetter* context_getter) {
344 system_request_context_ = context_getter; 344 system_request_context_ = context_getter;
345 } 345 }
346 346
347 void TestingBrowserProcess::SetLocalState(PrefServiceSimple* local_state) { 347 void TestingBrowserProcess::SetLocalState(PrefService* local_state) {
348 if (!local_state) { 348 if (!local_state) {
349 // The local_state_ PrefService is owned outside of TestingBrowserProcess, 349 // The local_state_ PrefService is owned outside of TestingBrowserProcess,
350 // but some of the members of TestingBrowserProcess hold references to it 350 // but some of the members of TestingBrowserProcess hold references to it
351 // (for example, via PrefNotifier members). But given our test 351 // (for example, via PrefNotifier members). But given our test
352 // infrastructure which tears down individual tests before freeing the 352 // infrastructure which tears down individual tests before freeing the
353 // TestingBrowserProcess, there's not a good way to make local_state outlive 353 // TestingBrowserProcess, there's not a good way to make local_state outlive
354 // these dependencies. As a workaround, whenever local_state_ is cleared 354 // these dependencies. As a workaround, whenever local_state_ is cleared
355 // (assumedly as part of exiting the test and freeing TestingBrowserProcess) 355 // (assumedly as part of exiting the test and freeing TestingBrowserProcess)
356 // any components owned by TestingBrowserProcess that depend on local_state 356 // any components owned by TestingBrowserProcess that depend on local_state
357 // are also freed. 357 // are also freed.
(...skipping 22 matching lines...) Expand all
380 #endif 380 #endif
381 } 381 }
382 382
383 void TestingBrowserProcess::SetSafeBrowsingService( 383 void TestingBrowserProcess::SetSafeBrowsingService(
384 SafeBrowsingService* sb_service) { 384 SafeBrowsingService* sb_service) {
385 #if !defined(OS_IOS) 385 #if !defined(OS_IOS)
386 NOTIMPLEMENTED(); 386 NOTIMPLEMENTED();
387 sb_service_ = sb_service; 387 sb_service_ = sb_service;
388 #endif 388 #endif
389 } 389 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | chrome/test/base/testing_pref_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698