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

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

Issue 14631021: Revert 199625 "Remove ENABLE_MESSAGE_CENTER" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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) 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"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" 12 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h"
13 #include "content/public/browser/notification_service.h" 13 #include "content/public/browser/notification_service.h"
14 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/message_center/message_center.h"
17 16
18 #if !defined(OS_IOS) 17 #if !defined(OS_IOS)
19 #include "chrome/browser/media_galleries/media_file_system_registry.h" 18 #include "chrome/browser/media_galleries/media_file_system_registry.h"
20 #include "chrome/browser/notifications/notification_ui_manager.h" 19 #include "chrome/browser/notifications/notification_ui_manager.h"
21 #include "chrome/browser/prerender/prerender_tracker.h" 20 #include "chrome/browser/prerender/prerender_tracker.h"
22 #include "chrome/browser/printing/background_printing_manager.h" 21 #include "chrome/browser/printing/background_printing_manager.h"
23 #include "chrome/browser/printing/print_preview_dialog_controller.h" 22 #include "chrome/browser/printing/print_preview_dialog_controller.h"
24 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 23 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
25 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" 24 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h"
26 #endif 25 #endif
27 26
28 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
29 #include "chrome/test/base/testing_browser_process_platform_part_chromeos.h" 28 #include "chrome/test/base/testing_browser_process_platform_part_chromeos.h"
30 #else 29 #else
31 #include "chrome/test/base/testing_browser_process_platform_part.h" 30 #include "chrome/test/base/testing_browser_process_platform_part.h"
32 #endif // defined(OS_CHROMEOS) 31 #endif // defined(OS_CHROMEOS)
33 32
34 #if defined(ENABLE_CONFIGURATION_POLICY) 33 #if defined(ENABLE_CONFIGURATION_POLICY)
35 #include "chrome/browser/policy/browser_policy_connector.h" 34 #include "chrome/browser/policy/browser_policy_connector.h"
36 #else 35 #else
37 #include "chrome/browser/policy/policy_service_stub.h" 36 #include "chrome/browser/policy/policy_service_stub.h"
38 #endif // defined(ENABLE_CONFIGURATION_POLICY) 37 #endif // defined(ENABLE_CONFIGURATION_POLICY)
39 38
39 #if defined(ENABLE_MESSAGE_CENTER)
40 #include "ui/message_center/message_center.h"
41 #endif
42
40 // static 43 // static
41 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() { 44 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() {
42 return static_cast<TestingBrowserProcess*>(g_browser_process); 45 return static_cast<TestingBrowserProcess*>(g_browser_process);
43 } 46 }
44 47
45 TestingBrowserProcess::TestingBrowserProcess() 48 TestingBrowserProcess::TestingBrowserProcess()
46 : notification_service_(content::NotificationService::Create()), 49 : notification_service_(content::NotificationService::Create()),
47 module_ref_count_(0), 50 module_ref_count_(0),
48 app_locale_("en"), 51 app_locale_("en"),
49 #if !defined(OS_IOS) 52 #if !defined(OS_IOS)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (!notification_ui_manager_.get()) 193 if (!notification_ui_manager_.get())
191 notification_ui_manager_.reset( 194 notification_ui_manager_.reset(
192 NotificationUIManager::Create(local_state())); 195 NotificationUIManager::Create(local_state()));
193 return notification_ui_manager_.get(); 196 return notification_ui_manager_.get();
194 #else 197 #else
195 NOTIMPLEMENTED(); 198 NOTIMPLEMENTED();
196 return NULL; 199 return NULL;
197 #endif 200 #endif
198 } 201 }
199 202
203 #if defined(ENABLE_MESSAGE_CENTER)
200 message_center::MessageCenter* TestingBrowserProcess::message_center() { 204 message_center::MessageCenter* TestingBrowserProcess::message_center() {
201 return message_center::MessageCenter::Get(); 205 return message_center::MessageCenter::Get();
202 } 206 }
207 #endif
203 208
204 IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() { 209 IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() {
205 return NULL; 210 return NULL;
206 } 211 }
207 212
208 AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() { 213 AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() {
209 return NULL; 214 return NULL;
210 } 215 }
211 216
212 void TestingBrowserProcess::CreateDevToolsHttpProtocolHandler( 217 void TestingBrowserProcess::CreateDevToolsHttpProtocolHandler(
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 #endif 388 #endif
384 } 389 }
385 390
386 void TestingBrowserProcess::SetSafeBrowsingService( 391 void TestingBrowserProcess::SetSafeBrowsingService(
387 SafeBrowsingService* sb_service) { 392 SafeBrowsingService* sb_service) {
388 #if !defined(OS_IOS) 393 #if !defined(OS_IOS)
389 NOTIMPLEMENTED(); 394 NOTIMPLEMENTED();
390 sb_service_ = sb_service; 395 sb_service_ = sb_service;
391 #endif 396 #endif
392 } 397 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/test/base/testing_browser_process.h ('k') | trunk/src/chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698