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

Side by Side Diff: chrome/test/testing_browser_process.cc

Issue 7096013: Allow device policy code to be optionally included. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make changes requested by torne. Created 9 years, 6 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/chrome_tests.gypi ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/testing_browser_process.h" 5 #include "chrome/test/testing_browser_process.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "chrome/browser/google/google_url_tracker.h" 9 #include "chrome/browser/google/google_url_tracker.h"
10 #include "chrome/browser/notifications/notification_ui_manager.h" 10 #include "chrome/browser/notifications/notification_ui_manager.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { 81 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) {
82 profile_manager_.reset(profile_manager); 82 profile_manager_.reset(profile_manager);
83 } 83 }
84 84
85 PrefService* TestingBrowserProcess::local_state() { 85 PrefService* TestingBrowserProcess::local_state() {
86 return local_state_; 86 return local_state_;
87 } 87 }
88 88
89 policy::BrowserPolicyConnector* 89 policy::BrowserPolicyConnector*
90 TestingBrowserProcess::browser_policy_connector() { 90 TestingBrowserProcess::browser_policy_connector() {
91 if (!browser_policy_connector_.get()) { 91 if (!browser_policy_connector_.get())
92 const policy::ConfigurationPolicyProvider::PolicyDefinitionList*
93 policy_list = policy::ConfigurationPolicyPrefStore::
94 GetChromePolicyDefinitionList();
95 browser_policy_connector_.reset( 92 browser_policy_connector_.reset(
96 new policy::BrowserPolicyConnector( 93 policy::BrowserPolicyConnector::CreateForTests());
97 new policy::DummyConfigurationPolicyProvider(policy_list),
98 new policy::DummyConfigurationPolicyProvider(policy_list)));
99 }
100 return browser_policy_connector_.get(); 94 return browser_policy_connector_.get();
101 } 95 }
102 96
103 IconManager* TestingBrowserProcess::icon_manager() { 97 IconManager* TestingBrowserProcess::icon_manager() {
104 return NULL; 98 return NULL;
105 } 99 }
106 100
107 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { 101 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() {
108 return NULL; 102 return NULL;
109 } 103 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 265
272 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { 266 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() {
273 DCHECK_EQ(browser_process_.get(), g_browser_process); 267 DCHECK_EQ(browser_process_.get(), g_browser_process);
274 268
275 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 269 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
276 // After the transition is over, we should just 270 // After the transition is over, we should just
277 // reset |g_browser_process| to NULL. 271 // reset |g_browser_process| to NULL.
278 browser_process_.reset(); 272 browser_process_.reset();
279 g_browser_process = new TestingBrowserProcess(); 273 g_browser_process = new TestingBrowserProcess();
280 } 274 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698