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

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

Issue 6914021: Modifying the BackgroundModeManager to handle multiple profiles. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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) 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/command_line.h"
7 #include "base/string_util.h" 8 #include "base/string_util.h"
8 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "chrome/browser/background_mode_manager.h"
9 #include "chrome/browser/google/google_url_tracker.h" 11 #include "chrome/browser/google/google_url_tracker.h"
10 #include "chrome/browser/notifications/notification_ui_manager.h" 12 #include "chrome/browser/notifications/notification_ui_manager.h"
11 #include "chrome/browser/policy/browser_policy_connector.h" 13 #include "chrome/browser/policy/browser_policy_connector.h"
12 #include "chrome/browser/policy/configuration_policy_pref_store.h" 14 #include "chrome/browser/policy/configuration_policy_pref_store.h"
13 #include "chrome/browser/policy/configuration_policy_provider.h" 15 #include "chrome/browser/policy/configuration_policy_provider.h"
14 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" 16 #include "chrome/browser/policy/dummy_configuration_policy_provider.h"
15 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/browser/printing/background_printing_manager.h" 18 #include "chrome/browser/printing/background_printing_manager.h"
17 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
18 #include "net/url_request/url_request_context_getter.h" 20 #include "net/url_request/url_request_context_getter.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 118 }
117 119
118 SidebarManager* TestingBrowserProcess::sidebar_manager() { 120 SidebarManager* TestingBrowserProcess::sidebar_manager() {
119 return NULL; 121 return NULL;
120 } 122 }
121 123
122 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { 124 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() {
123 return NULL; 125 return NULL;
124 } 126 }
125 127
128 BackgroundModeManager* TestingBrowserProcess::background_mode_manager() {
129 if (!background_mode_manager_.get()) {
130 CommandLine cl(CommandLine::NO_PROGRAM);
131 background_mode_manager_.reset(new BackgroundModeManager(&cl, true));
Andrew T Wilson (Slow) 2011/05/24 20:49:28 Not sure why we aren't returning NULL here any mor
rpetterson 2011/05/24 21:48:43 Done.
132 }
133 return background_mode_manager_.get();
134 }
135
136 StatusTray* TestingBrowserProcess::status_tray() {
137 return NULL;
138 }
139
126 safe_browsing::ClientSideDetectionService* 140 safe_browsing::ClientSideDetectionService*
127 TestingBrowserProcess::safe_browsing_detection_service() { 141 TestingBrowserProcess::safe_browsing_detection_service() {
128 return NULL; 142 return NULL;
129 } 143 }
130 144
131 net::URLRequestContextGetter* TestingBrowserProcess::system_request_context() { 145 net::URLRequestContextGetter* TestingBrowserProcess::system_request_context() {
132 return NULL; 146 return NULL;
133 } 147 }
134 148
135 #if defined(OS_CHROMEOS) 149 #if defined(OS_CHROMEOS)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 274
261 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { 275 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() {
262 DCHECK_EQ(browser_process_.get(), g_browser_process); 276 DCHECK_EQ(browser_process_.get(), g_browser_process);
263 277
264 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 278 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
265 // After the transition is over, we should just 279 // After the transition is over, we should just
266 // reset |g_browser_process| to NULL. 280 // reset |g_browser_process| to NULL.
267 browser_process_.reset(); 281 browser_process_.reset();
268 g_browser_process = new TestingBrowserProcess(); 282 g_browser_process = new TestingBrowserProcess();
269 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698