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 "chrome/browser/google/google_url_tracker.h" | 8 #include "chrome/browser/google/google_url_tracker.h" |
9 #include "chrome/browser/notifications/notification_ui_manager.h" | 9 #include "chrome/browser/notifications/notification_ui_manager.h" |
10 #include "chrome/browser/policy/browser_policy_connector.h" | 10 #include "chrome/browser/policy/browser_policy_connector.h" |
11 #include "chrome/browser/policy/cloud_policy_cache_base.h" | |
12 #include "chrome/browser/policy/cloud_policy_provider.h" | |
13 #include "chrome/browser/policy/configuration_policy_pref_store.h" | |
14 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" | |
Joao da Silva
2011/06/29 11:36:17
What are these includes for? They don't seem neces
gfeher
2011/06/29 12:53:07
Good question. Let's see if I can remove them.
| |
11 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
12 #include "chrome/browser/prerender/prerender_tracker.h" | 16 #include "chrome/browser/prerender/prerender_tracker.h" |
13 #include "chrome/browser/printing/background_printing_manager.h" | 17 #include "chrome/browser/printing/background_printing_manager.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "net/url_request/url_request_context_getter.h" | 19 #include "net/url_request/url_request_context_getter.h" |
16 #include "ui/base/clipboard/clipboard.h" | 20 #include "ui/base/clipboard/clipboard.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
18 | 22 |
19 TestingBrowserProcess::TestingBrowserProcess() | 23 TestingBrowserProcess::TestingBrowserProcess() |
20 : module_ref_count_(0), | 24 : module_ref_count_(0), |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { | 74 void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) { |
71 profile_manager_.reset(profile_manager); | 75 profile_manager_.reset(profile_manager); |
72 } | 76 } |
73 | 77 |
74 PrefService* TestingBrowserProcess::local_state() { | 78 PrefService* TestingBrowserProcess::local_state() { |
75 return local_state_; | 79 return local_state_; |
76 } | 80 } |
77 | 81 |
78 policy::BrowserPolicyConnector* | 82 policy::BrowserPolicyConnector* |
79 TestingBrowserProcess::browser_policy_connector() { | 83 TestingBrowserProcess::browser_policy_connector() { |
80 if (!browser_policy_connector_.get()) | 84 if (!browser_policy_connector_.get()) { |
81 browser_policy_connector_.reset( | 85 browser_policy_connector_.reset( |
82 policy::BrowserPolicyConnector::CreateForTests()); | 86 policy::BrowserPolicyConnector::CreateForTests()); |
87 } | |
83 return browser_policy_connector_.get(); | 88 return browser_policy_connector_.get(); |
84 } | 89 } |
85 | 90 |
86 IconManager* TestingBrowserProcess::icon_manager() { | 91 IconManager* TestingBrowserProcess::icon_manager() { |
87 return NULL; | 92 return NULL; |
88 } | 93 } |
89 | 94 |
90 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { | 95 ThumbnailGenerator* TestingBrowserProcess::GetThumbnailGenerator() { |
91 return NULL; | 96 return NULL; |
92 } | 97 } |
(...skipping 167 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 |