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

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: Switch to desired interfaces. Created 7 years, 11 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return profile_manager_.get(); 81 return profile_manager_.get();
82 #endif 82 #endif
83 } 83 }
84 84
85 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { 85 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) {
86 #if !defined(OS_IOS) 86 #if !defined(OS_IOS)
87 profile_manager_.reset(profile_manager); 87 profile_manager_.reset(profile_manager);
88 #endif 88 #endif
89 } 89 }
90 90
91 PrefServiceSimple* TestingBrowserProcess::local_state() { 91 PrefService* TestingBrowserProcess::local_state() {
92 return local_state_; 92 return local_state_;
93 } 93 }
94 94
95 chrome_variations::VariationsService* 95 chrome_variations::VariationsService*
96 TestingBrowserProcess::variations_service() { 96 TestingBrowserProcess::variations_service() {
97 return NULL; 97 return NULL;
98 } 98 }
99 99
100 policy::BrowserPolicyConnector* 100 policy::BrowserPolicyConnector*
101 TestingBrowserProcess::browser_policy_connector() { 101 TestingBrowserProcess::browser_policy_connector() {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 #if !defined(OS_IOS) 317 #if !defined(OS_IOS)
318 bookmark_prompt_controller_.reset(controller); 318 bookmark_prompt_controller_.reset(controller);
319 #endif 319 #endif
320 } 320 }
321 321
322 void TestingBrowserProcess::SetSystemRequestContext( 322 void TestingBrowserProcess::SetSystemRequestContext(
323 net::URLRequestContextGetter* context_getter) { 323 net::URLRequestContextGetter* context_getter) {
324 system_request_context_ = context_getter; 324 system_request_context_ = context_getter;
325 } 325 }
326 326
327 void TestingBrowserProcess::SetLocalState(PrefServiceSimple* local_state) { 327 void TestingBrowserProcess::SetLocalState(PrefService* local_state) {
328 if (!local_state) { 328 if (!local_state) {
329 // The local_state_ PrefService is owned outside of TestingBrowserProcess, 329 // The local_state_ PrefService is owned outside of TestingBrowserProcess,
330 // but some of the members of TestingBrowserProcess hold references to it 330 // but some of the members of TestingBrowserProcess hold references to it
331 // (for example, via PrefNotifier members). But given our test 331 // (for example, via PrefNotifier members). But given our test
332 // infrastructure which tears down individual tests before freeing the 332 // infrastructure which tears down individual tests before freeing the
333 // TestingBrowserProcess, there's not a good way to make local_state outlive 333 // TestingBrowserProcess, there's not a good way to make local_state outlive
334 // these dependencies. As a workaround, whenever local_state_ is cleared 334 // these dependencies. As a workaround, whenever local_state_ is cleared
335 // (assumedly as part of exiting the test and freeing TestingBrowserProcess) 335 // (assumedly as part of exiting the test and freeing TestingBrowserProcess)
336 // any components owned by TestingBrowserProcess that depend on local_state 336 // any components owned by TestingBrowserProcess that depend on local_state
337 // are also freed. 337 // are also freed.
(...skipping 22 matching lines...) Expand all
360 #endif 360 #endif
361 } 361 }
362 362
363 void TestingBrowserProcess::SetSafeBrowsingService( 363 void TestingBrowserProcess::SetSafeBrowsingService(
364 SafeBrowsingService* sb_service) { 364 SafeBrowsingService* sb_service) {
365 #if !defined(OS_IOS) 365 #if !defined(OS_IOS)
366 NOTIMPLEMENTED(); 366 NOTIMPLEMENTED();
367 sb_service_ = sb_service; 367 sb_service_ = sb_service;
368 #endif 368 #endif
369 } 369 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698