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/browser_process.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
24 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" | 24 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h" |
25 #endif | 25 #endif |
26 | 26 |
27 #if defined(ENABLE_CONFIGURATION_POLICY) | 27 #if defined(ENABLE_CONFIGURATION_POLICY) |
28 #include "chrome/browser/policy/browser_policy_connector.h" | 28 #include "chrome/browser/policy/browser_policy_connector.h" |
29 #else | 29 #else |
30 #include "chrome/browser/policy/policy_service_stub.h" | 30 #include "chrome/browser/policy/policy_service_stub.h" |
31 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 31 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
32 | 32 |
| 33 // static |
| 34 TestingBrowserProcess* TestingBrowserProcess::GetGlobal() { |
| 35 return static_cast<TestingBrowserProcess*>(g_browser_process); |
| 36 } |
| 37 |
33 TestingBrowserProcess::TestingBrowserProcess() | 38 TestingBrowserProcess::TestingBrowserProcess() |
34 : notification_service_(content::NotificationService::Create()), | 39 : notification_service_(content::NotificationService::Create()), |
35 module_ref_count_(0), | 40 module_ref_count_(0), |
36 app_locale_("en"), | 41 app_locale_("en"), |
37 #if !defined(OS_IOS) | 42 #if !defined(OS_IOS) |
38 render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker), | 43 render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker), |
39 #endif | 44 #endif |
40 local_state_(NULL), | 45 local_state_(NULL), |
41 io_thread_(NULL), | 46 io_thread_(NULL), |
42 system_request_context_(NULL) { | 47 system_request_context_(NULL) { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 #endif | 360 #endif |
356 } | 361 } |
357 | 362 |
358 void TestingBrowserProcess::SetSafeBrowsingService( | 363 void TestingBrowserProcess::SetSafeBrowsingService( |
359 SafeBrowsingService* sb_service) { | 364 SafeBrowsingService* sb_service) { |
360 #if !defined(OS_IOS) | 365 #if !defined(OS_IOS) |
361 NOTIMPLEMENTED(); | 366 NOTIMPLEMENTED(); |
362 sb_service_ = sb_service; | 367 sb_service_ = sb_service; |
363 #endif | 368 #endif |
364 } | 369 } |
OLD | NEW |