Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/test/testing_profile.h

Issue 6803012: Profile shouldn't own DesktopNotificationService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_TEST_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_
6 #define CHROME_TEST_TESTING_PROFILE_H_ 6 #define CHROME_TEST_TESTING_PROFILE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/scoped_temp_dir.h" 11 #include "base/memory/scoped_temp_dir.h"
12 #include "base/timer.h" 12 #include "base/timer.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 14
15 namespace history { 15 namespace history {
16 class TopSites; 16 class TopSites;
17 } 17 }
18 18
19 namespace net { 19 namespace net {
20 class CookieMonster; 20 class CookieMonster;
21 } 21 }
22 22
23 namespace quota { 23 namespace quota {
24 class SpecialStoragePolicy; 24 class SpecialStoragePolicy;
25 } 25 }
26 26
27 class AutocompleteClassifier; 27 class AutocompleteClassifier;
28 class BookmarkModel; 28 class BookmarkModel;
29 class CommandLine; 29 class CommandLine;
30 class DesktopNotificationService;
31 class ExtensionPrefs; 30 class ExtensionPrefs;
32 class ExtensionPrefStore; 31 class ExtensionPrefStore;
33 class ExtensionPrefValueMap; 32 class ExtensionPrefValueMap;
34 class ExtensionSpecialStoragePolicy; 33 class ExtensionSpecialStoragePolicy;
35 class FaviconService; 34 class FaviconService;
36 class FindBarState; 35 class FindBarState;
37 class GeolocationContentSettingsMap; 36 class GeolocationContentSettingsMap;
38 class GeolocationPermissionContext; 37 class GeolocationPermissionContext;
39 class HistoryService; 38 class HistoryService;
40 class HostContentSettingsMap; 39 class HostContentSettingsMap;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 122
124 // Creates an ExtensionService initialized with the testing profile and 123 // Creates an ExtensionService initialized with the testing profile and
125 // returns it. The profile keeps its own copy of a scoped_refptr to the 124 // returns it. The profile keeps its own copy of a scoped_refptr to the
126 // ExtensionService to make sure that is still alive to be notified when the 125 // ExtensionService to make sure that is still alive to be notified when the
127 // profile is destroyed. 126 // profile is destroyed.
128 ExtensionService* CreateExtensionService(const CommandLine* command_line, 127 ExtensionService* CreateExtensionService(const CommandLine* command_line,
129 const FilePath& install_directory); 128 const FilePath& install_directory);
130 129
131 TestingPrefService* GetTestingPrefService(); 130 TestingPrefService* GetTestingPrefService();
132 131
133 void SetProfileDependencyManager(ProfileDependencyManager* manager);
134
135 virtual ProfileId GetRuntimeId(); 132 virtual ProfileId GetRuntimeId();
136 133
137 virtual FilePath GetPath(); 134 virtual FilePath GetPath();
138 135
139 // Sets whether we're incognito. Default is false. 136 // Sets whether we're incognito. Default is false.
140 void set_incognito(bool incognito) { 137 void set_incognito(bool incognito) {
141 incognito_ = incognito; 138 incognito_ = incognito;
142 } 139 }
143 virtual bool IsOffTheRecord(); 140 virtual bool IsOffTheRecord();
144 // Assumes ownership. 141 // Assumes ownership.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 virtual SpellCheckHost* GetSpellCheckHost(); 240 virtual SpellCheckHost* GetSpellCheckHost();
244 virtual void ReinitializeSpellCheckHost(bool force) { } 241 virtual void ReinitializeSpellCheckHost(bool force) { }
245 virtual WebKitContext* GetWebKitContext(); 242 virtual WebKitContext* GetWebKitContext();
246 virtual WebKitContext* GetOffTheRecordWebKitContext(); 243 virtual WebKitContext* GetOffTheRecordWebKitContext();
247 virtual void MarkAsCleanShutdown() {} 244 virtual void MarkAsCleanShutdown() {}
248 virtual void InitExtensions() {} 245 virtual void InitExtensions() {}
249 virtual void InitPromoResources() {} 246 virtual void InitPromoResources() {}
250 virtual void InitRegisteredProtocolHandlers() {} 247 virtual void InitRegisteredProtocolHandlers() {}
251 virtual NTPResourceCache* GetNTPResourceCache(); 248 virtual NTPResourceCache* GetNTPResourceCache();
252 249
253 virtual DesktopNotificationService* GetDesktopNotificationService();
254 virtual BackgroundContentsService* GetBackgroundContentsService() const; 250 virtual BackgroundContentsService* GetBackgroundContentsService() const;
255 virtual StatusTray* GetStatusTray(); 251 virtual StatusTray* GetStatusTray();
256 virtual FilePath last_selected_directory(); 252 virtual FilePath last_selected_directory();
257 virtual void set_last_selected_directory(const FilePath& path); 253 virtual void set_last_selected_directory(const FilePath& path);
258 #if defined(OS_CHROMEOS) 254 #if defined(OS_CHROMEOS)
259 virtual void SetupChromeOSEnterpriseExtensionObserver() { 255 virtual void SetupChromeOSEnterpriseExtensionObserver() {
260 } 256 }
261 virtual void InitChromeOSPreferences() { 257 virtual void InitChromeOSPreferences() {
262 } 258 }
263 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) { 259 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Should be used only on the file thread. 360 // Should be used only on the file thread.
365 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; 361 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
366 362
367 // WebKitContext, lazily initialized by GetWebKitContext(). 363 // WebKitContext, lazily initialized by GetWebKitContext().
368 scoped_refptr<WebKitContext> webkit_context_; 364 scoped_refptr<WebKitContext> webkit_context_;
369 365
370 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 366 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
371 scoped_refptr<GeolocationContentSettingsMap> 367 scoped_refptr<GeolocationContentSettingsMap>
372 geolocation_content_settings_map_; 368 geolocation_content_settings_map_;
373 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_; 369 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_;
374 scoped_ptr<DesktopNotificationService> desktop_notification_service_;
375 370
376 // Find bar state. Created lazily by GetFindBarState(). 371 // Find bar state. Created lazily by GetFindBarState().
377 scoped_ptr<FindBarState> find_bar_state_; 372 scoped_ptr<FindBarState> find_bar_state_;
378 373
379 FilePath last_selected_directory_; 374 FilePath last_selected_directory_;
380 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. 375 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails.
381 376
382 // The Extension Preferences. Only created if CreateExtensionService is 377 // The Extension Preferences. Only created if CreateExtensionService is
383 // invoked. 378 // invoked.
384 scoped_ptr<ExtensionPrefs> extension_prefs_; 379 scoped_ptr<ExtensionPrefs> extension_prefs_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 explicit DerivedTestingProfile(Profile* profile); 411 explicit DerivedTestingProfile(Profile* profile);
417 virtual ~DerivedTestingProfile(); 412 virtual ~DerivedTestingProfile();
418 413
419 virtual ProfileId GetRuntimeId(); 414 virtual ProfileId GetRuntimeId();
420 415
421 protected: 416 protected:
422 Profile* original_profile_; 417 Profile* original_profile_;
423 }; 418 };
424 419
425 #endif // CHROME_TEST_TESTING_PROFILE_H_ 420 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698