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

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

Issue 12375004: Re-home the global MessageCenter to support Ash+Win environments. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master. Created 7 years, 9 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
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | chrome/test/base/view_event_test_base.cc » ('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/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 16 matching lines...) Expand all
27 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
28 #include "chrome/browser/chromeos/settings/device_settings_service.h" 28 #include "chrome/browser/chromeos/settings/device_settings_service.h"
29 #endif 29 #endif
30 30
31 #if defined(ENABLE_CONFIGURATION_POLICY) 31 #if defined(ENABLE_CONFIGURATION_POLICY)
32 #include "chrome/browser/policy/browser_policy_connector.h" 32 #include "chrome/browser/policy/browser_policy_connector.h"
33 #else 33 #else
34 #include "chrome/browser/policy/policy_service_stub.h" 34 #include "chrome/browser/policy/policy_service_stub.h"
35 #endif // defined(ENABLE_CONFIGURATION_POLICY) 35 #endif // defined(ENABLE_CONFIGURATION_POLICY)
36 36
37 #if defined(ENABLE_MESSAGE_CENTER) && defined(USE_ASH)
38 #include "ash/shell.h"
39 #endif
40
41 #if defined(ENABLE_MESSAGE_CENTER) 37 #if defined(ENABLE_MESSAGE_CENTER)
42 #include "ui/message_center/message_center.h" 38 #include "ui/message_center/message_center.h"
43 #endif 39 #endif
44 40
45 // static 41 // static
46 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() { 42 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() {
47 return static_cast<TestingBrowserProcess*>(g_browser_process); 43 return static_cast<TestingBrowserProcess*>(g_browser_process);
48 } 44 }
49 45
50 TestingBrowserProcess::TestingBrowserProcess() 46 TestingBrowserProcess::TestingBrowserProcess()
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 NotificationUIManager::Create(local_state())); 190 NotificationUIManager::Create(local_state()));
195 return notification_ui_manager_.get(); 191 return notification_ui_manager_.get();
196 #else 192 #else
197 NOTIMPLEMENTED(); 193 NOTIMPLEMENTED();
198 return NULL; 194 return NULL;
199 #endif 195 #endif
200 } 196 }
201 197
202 #if defined(ENABLE_MESSAGE_CENTER) 198 #if defined(ENABLE_MESSAGE_CENTER)
203 message_center::MessageCenter* TestingBrowserProcess::message_center() { 199 message_center::MessageCenter* TestingBrowserProcess::message_center() {
204 #if defined(USE_ASH) 200 return message_center::MessageCenter::Get();
205 return ash::Shell::GetInstance()->message_center();
206 #else
207 if (!message_center_.get())
208 message_center_.reset(new message_center::MessageCenter());
209 return message_center_.get();
210 #endif
211 } 201 }
212 #endif 202 #endif
213 203
214 IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() { 204 IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() {
215 return NULL; 205 return NULL;
216 } 206 }
217 207
218 AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() { 208 AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() {
219 return NULL; 209 return NULL;
220 } 210 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 #endif 382 #endif
393 } 383 }
394 384
395 void TestingBrowserProcess::SetSafeBrowsingService( 385 void TestingBrowserProcess::SetSafeBrowsingService(
396 SafeBrowsingService* sb_service) { 386 SafeBrowsingService* sb_service) {
397 #if !defined(OS_IOS) 387 #if !defined(OS_IOS)
398 NOTIMPLEMENTED(); 388 NOTIMPLEMENTED();
399 sb_service_ = sb_service; 389 sb_service_ = sb_service;
400 #endif 390 #endif
401 } 391 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698