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

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

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
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"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // returns it. The profile keeps its own copy of a scoped_refptr to the 126 // returns it. The profile keeps its own copy of a scoped_refptr to the
127 // ExtensionService to make sure that is still alive to be notified when the 127 // ExtensionService to make sure that is still alive to be notified when the
128 // profile is destroyed. 128 // profile is destroyed.
129 ExtensionService* CreateExtensionService(const CommandLine* command_line, 129 ExtensionService* CreateExtensionService(const CommandLine* command_line,
130 const FilePath& install_directory, 130 const FilePath& install_directory,
131 bool autoupdate_enabled); 131 bool autoupdate_enabled);
132 132
133 TestingPrefService* GetTestingPrefService(); 133 TestingPrefService* GetTestingPrefService();
134 134
135 virtual TestingProfile* AsTestingProfile(); 135 virtual TestingProfile* AsTestingProfile();
136
137 virtual std::string GetProfileName(); 136 virtual std::string GetProfileName();
138 virtual ProfileId GetRuntimeId();
139
140 virtual FilePath GetPath(); 137 virtual FilePath GetPath();
141 138 void set_incognito(bool incognito) { incognito_ = incognito; }
142 // Sets whether we're incognito. Default is false.
143 void set_incognito(bool incognito) {
144 incognito_ = incognito;
145 }
146 virtual bool IsOffTheRecord(); 139 virtual bool IsOffTheRecord();
147 // Assumes ownership. 140 // Assumes ownership.
148 virtual void SetOffTheRecordProfile(Profile* profile); 141 virtual void SetOffTheRecordProfile(Profile* profile);
149 virtual Profile* GetOffTheRecordProfile(); 142 virtual Profile* GetOffTheRecordProfile();
150
151 virtual void DestroyOffTheRecordProfile() {} 143 virtual void DestroyOffTheRecordProfile() {}
152
153 virtual bool HasOffTheRecordProfile(); 144 virtual bool HasOffTheRecordProfile();
154
155 virtual Profile* GetOriginalProfile(); 145 virtual Profile* GetOriginalProfile();
156 void SetAppCacheService(ChromeAppCacheService* appcache_service); 146 void SetAppCacheService(ChromeAppCacheService* appcache_service);
157 virtual ChromeAppCacheService* GetAppCacheService(); 147 virtual ChromeAppCacheService* GetAppCacheService();
158 virtual webkit_database::DatabaseTracker* GetDatabaseTracker(); 148 virtual webkit_database::DatabaseTracker* GetDatabaseTracker();
159 virtual VisitedLinkMaster* GetVisitedLinkMaster(); 149 virtual VisitedLinkMaster* GetVisitedLinkMaster();
160 virtual ExtensionService* GetExtensionService(); 150 virtual ExtensionService* GetExtensionService();
161 virtual UserScriptMaster* GetUserScriptMaster(); 151 virtual UserScriptMaster* GetUserScriptMaster();
162 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager(); 152 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager();
163 virtual ExtensionProcessManager* GetExtensionProcessManager(); 153 virtual ExtensionProcessManager* GetExtensionProcessManager();
164 virtual ExtensionMessageService* GetExtensionMessageService(); 154 virtual ExtensionMessageService* GetExtensionMessageService();
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 scoped_ptr<prerender::PrerenderManager> prerender_manager_; 384 scoped_ptr<prerender::PrerenderManager> prerender_manager_;
395 385
396 // We keep a weak pointer to the dependency manager we want to notify on our 386 // We keep a weak pointer to the dependency manager we want to notify on our
397 // death. Defaults to the Singleton implementation but overridable for 387 // death. Defaults to the Singleton implementation but overridable for
398 // testing. 388 // testing.
399 ProfileDependencyManager* profile_dependency_manager_; 389 ProfileDependencyManager* profile_dependency_manager_;
400 390
401 scoped_refptr<ChromeAppCacheService> appcache_service_; 391 scoped_refptr<ChromeAppCacheService> appcache_service_;
402 }; 392 };
403 393
404 // A profile that derives from another profile. This does not actually
405 // override anything except the GetRuntimeId() in order to test sharing of
406 // site information.
407 class DerivedTestingProfile : public TestingProfile {
408 public:
409 explicit DerivedTestingProfile(Profile* profile);
410 virtual ~DerivedTestingProfile();
411
412 virtual ProfileId GetRuntimeId();
413
414 protected:
415 Profile* original_profile_;
416 };
417
418 #endif // CHROME_TEST_TESTING_PROFILE_H_ 394 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc ('k') | chrome/test/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698