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 // An implementation of BrowserProcess for unit tests that fails for most | 5 // An implementation of BrowserProcess for unit tests that fails for most |
6 // services. By preventing creation of services, we reduce dependencies and | 6 // services. By preventing creation of services, we reduce dependencies and |
7 // keep the profile clean. Clients of this class must handle the NULL return | 7 // keep the profile clean. Clients of this class must handle the NULL return |
8 // value, however. | 8 // value, however. |
9 | 9 |
10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ | 10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class IOThread; | 22 class IOThread; |
23 class GoogleURLTracker; | 23 class GoogleURLTracker; |
24 class PrefService; | 24 class PrefService; |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 class WaitableEvent; | 27 class WaitableEvent; |
28 } | 28 } |
29 | 29 |
30 namespace policy { | 30 namespace policy { |
31 class ConfigurationPolicyProviderKeeper; | 31 class BrowserPolicyConnector; |
32 } | 32 } |
33 | 33 |
34 namespace ui { | 34 namespace ui { |
35 class Clipboard; | 35 class Clipboard; |
36 } | 36 } |
37 | 37 |
38 class TestingBrowserProcess : public BrowserProcess { | 38 class TestingBrowserProcess : public BrowserProcess { |
39 public: | 39 public: |
40 TestingBrowserProcess(); | 40 TestingBrowserProcess(); |
41 virtual ~TestingBrowserProcess(); | 41 virtual ~TestingBrowserProcess(); |
(...skipping 13 matching lines...) Expand all Loading... |
55 virtual base::Thread* file_thread(); | 55 virtual base::Thread* file_thread(); |
56 | 56 |
57 virtual base::Thread* db_thread(); | 57 virtual base::Thread* db_thread(); |
58 | 58 |
59 virtual base::Thread* cache_thread(); | 59 virtual base::Thread* cache_thread(); |
60 | 60 |
61 virtual ProfileManager* profile_manager(); | 61 virtual ProfileManager* profile_manager(); |
62 | 62 |
63 virtual PrefService* local_state(); | 63 virtual PrefService* local_state(); |
64 | 64 |
65 virtual policy::ConfigurationPolicyProviderKeeper* | 65 virtual policy::BrowserPolicyConnector* browser_policy_connector(); |
66 configuration_policy_provider_keeper(); | |
67 | 66 |
68 virtual IconManager* icon_manager(); | 67 virtual IconManager* icon_manager(); |
69 | 68 |
70 virtual ThumbnailGenerator* GetThumbnailGenerator(); | 69 virtual ThumbnailGenerator* GetThumbnailGenerator(); |
71 | 70 |
72 virtual DevToolsManager* devtools_manager(); | 71 virtual DevToolsManager* devtools_manager(); |
73 | 72 |
74 virtual SidebarManager* sidebar_manager(); | 73 virtual SidebarManager* sidebar_manager(); |
75 | 74 |
76 virtual TabCloseableStateWatcher* tab_closeable_state_watcher(); | 75 virtual TabCloseableStateWatcher* tab_closeable_state_watcher(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); | 126 void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker); |
128 | 127 |
129 private: | 128 private: |
130 NotificationService notification_service_; | 129 NotificationService notification_service_; |
131 scoped_ptr<base::WaitableEvent> shutdown_event_; | 130 scoped_ptr<base::WaitableEvent> shutdown_event_; |
132 unsigned int module_ref_count_; | 131 unsigned int module_ref_count_; |
133 scoped_ptr<ui::Clipboard> clipboard_; | 132 scoped_ptr<ui::Clipboard> clipboard_; |
134 std::string app_locale_; | 133 std::string app_locale_; |
135 | 134 |
136 PrefService* pref_service_; | 135 PrefService* pref_service_; |
137 bool created_configuration_policy_provider_keeper_; | 136 scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; |
138 scoped_ptr<policy::ConfigurationPolicyProviderKeeper> | |
139 configuration_policy_provider_keeper_; | |
140 scoped_ptr<GoogleURLTracker> google_url_tracker_; | 137 scoped_ptr<GoogleURLTracker> google_url_tracker_; |
141 | 138 |
142 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); | 139 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
143 }; | 140 }; |
144 | 141 |
145 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ | 142 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ |
OLD | NEW |