OLD | NEW |
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/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "chrome/browser/google/google_url_tracker.h" | 9 #include "chrome/browser/google/google_url_tracker.h" |
10 #include "chrome/browser/notifications/notification_ui_manager.h" | 10 #include "chrome/browser/notifications/notification_ui_manager.h" |
11 #include "chrome/browser/policy/browser_policy_connector.h" | 11 #include "chrome/browser/policy/browser_policy_connector.h" |
| 12 #include "chrome/browser/policy/cloud_policy_cache_base.h" |
| 13 #include "chrome/browser/policy/cloud_policy_provider.h" |
| 14 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 15 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" |
12 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/prerender/prerender_tracker.h" | 17 #include "chrome/browser/prerender/prerender_tracker.h" |
14 #include "chrome/browser/printing/background_printing_manager.h" | 18 #include "chrome/browser/printing/background_printing_manager.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
17 #include "ui/base/clipboard/clipboard.h" | 21 #include "ui/base/clipboard/clipboard.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
19 | 23 |
20 TestingBrowserProcess::TestingBrowserProcess() | 24 TestingBrowserProcess::TestingBrowserProcess() |
21 : shutdown_event_(new base::WaitableEvent(true, false)), | 25 : shutdown_event_(new base::WaitableEvent(true, false)), |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { | 76 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { |
73 profile_manager_.reset(profile_manager); | 77 profile_manager_.reset(profile_manager); |
74 } | 78 } |
75 | 79 |
76 PrefService* TestingBrowserProcess::local_state() { | 80 PrefService* TestingBrowserProcess::local_state() { |
77 return local_state_; | 81 return local_state_; |
78 } | 82 } |
79 | 83 |
80 policy::BrowserPolicyConnector* | 84 policy::BrowserPolicyConnector* |
81 TestingBrowserProcess::browser_policy_connector() { | 85 TestingBrowserProcess::browser_policy_connector() { |
82 if (!browser_policy_connector_.get()) | 86 if (!browser_policy_connector_.get()) { |
83 browser_policy_connector_.reset( | 87 browser_policy_connector_.reset( |
84 policy::BrowserPolicyConnector::CreateForTests()); | 88 policy::BrowserPolicyConnector::CreateForTests()); |
| 89 } |
85 return browser_policy_connector_.get(); | 90 return browser_policy_connector_.get(); |
86 } | 91 } |
87 | 92 |
88 IconManager* TestingBrowserProcess::icon_manager() { | 93 IconManager* TestingBrowserProcess::icon_manager() { |
89 return NULL; | 94 return NULL; |
90 } | 95 } |
91 | 96 |
92 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { | 97 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { |
93 return NULL; | 98 return NULL; |
94 } | 99 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 265 |
261 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { | 266 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { |
262 DCHECK_EQ(browser_process_.get(), g_browser_process); | 267 DCHECK_EQ(browser_process_.get(), g_browser_process); |
263 | 268 |
264 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. | 269 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. |
265 // After the transition is over, we should just | 270 // After the transition is over, we should just |
266 // reset |g_browser_process| to NULL. | 271 // reset |g_browser_process| to NULL. |
267 browser_process_.reset(); | 272 browser_process_.reset(); |
268 g_browser_process = new TestingBrowserProcess(); | 273 g_browser_process = new TestingBrowserProcess(); |
269 } | 274 } |
OLD | NEW |