OLD | NEW |
---|---|
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/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
11 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" | 12 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" |
12 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
13 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 | 16 |
16 #if !defined(OS_IOS) | 17 #if !defined(OS_IOS) |
17 #include "chrome/browser/media_gallery/media_file_system_registry.h" | 18 #include "chrome/browser/media_gallery/media_file_system_registry.h" |
18 #include "chrome/browser/notifications/notification_ui_manager.h" | 19 #include "chrome/browser/notifications/notification_ui_manager.h" |
19 #include "chrome/browser/prerender/prerender_tracker.h" | 20 #include "chrome/browser/prerender/prerender_tracker.h" |
20 #include "chrome/browser/printing/background_printing_manager.h" | 21 #include "chrome/browser/printing/background_printing_manager.h" |
21 #include "chrome/browser/printing/print_preview_dialog_controller.h" | 22 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
22 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
23 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" | 24 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" |
24 #endif | 25 #endif |
25 | 26 |
26 #if defined(ENABLE_CONFIGURATION_POLICY) | 27 #if defined(ENABLE_CONFIGURATION_POLICY) |
27 #include "chrome/browser/policy/browser_policy_connector.h" | 28 #include "chrome/browser/policy/browser_policy_connector.h" |
28 #else | 29 #else |
29 #include "chrome/browser/policy/policy_service_stub.h" | 30 #include "chrome/browser/policy/policy_service_stub.h" |
30 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 31 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
31 | 32 |
33 // static | |
34 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() { | |
Robert Sesek
2013/01/04 01:16:13
I'm not sure this is right. Also, who's setting up
Dan Beam
2013/01/04 01:34:42
I talked with jcivelli@ about this (a chrome/test
| |
35 return static_cast<TestingBrowserProcess*>(g_browser_process); | |
36 } | |
37 | |
32 TestingBrowserProcess::TestingBrowserProcess() | 38 TestingBrowserProcess::TestingBrowserProcess() |
33 : notification_service_(content::NotificationService::Create()), | 39 : notification_service_(content::NotificationService::Create()), |
34 module_ref_count_(0), | 40 module_ref_count_(0), |
35 app_locale_("en"), | 41 app_locale_("en"), |
36 #if !defined(OS_IOS) | 42 #if !defined(OS_IOS) |
37 render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker), | 43 render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker), |
38 #endif | 44 #endif |
39 local_state_(NULL), | 45 local_state_(NULL), |
40 io_thread_(NULL), | 46 io_thread_(NULL), |
41 system_request_context_(NULL) { | 47 system_request_context_(NULL) { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 #endif | 360 #endif |
355 } | 361 } |
356 | 362 |
357 void TestingBrowserProcess::SetSafeBrowsingService( | 363 void TestingBrowserProcess::SetSafeBrowsingService( |
358 SafeBrowsingService* sb_service) { | 364 SafeBrowsingService* sb_service) { |
359 #if !defined(OS_IOS) | 365 #if !defined(OS_IOS) |
360 NOTIMPLEMENTED(); | 366 NOTIMPLEMENTED(); |
361 sb_service_ = sb_service; | 367 sb_service_ = sb_service; |
362 #endif | 368 #endif |
363 } | 369 } |
OLD | NEW |