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

Unified Diff: chrome/test/testing_profile.h

Issue 255087: Adding a unique runtime Id to Profile objects, that can be used as the key... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_profile.h
===================================================================
--- chrome/test/testing_profile.h (revision 28102)
+++ chrome/test/testing_profile.h (working copy)
@@ -57,6 +57,10 @@
// ownership of |theme_provider|.
void UseThemeProvider(BrowserThemeProvider* theme_provider);
+ virtual ProfileId GetRuntimeId() {
+ return reinterpret_cast<ProfileId>(this);
+ }
+
virtual FilePath GetPath() {
return path_;
}
@@ -221,4 +225,20 @@
bool last_session_exited_cleanly_;
};
+// A profile that derives from another profile. This does not actually
+// override anything except the GetRuntimeId() in order to test sharing of
+// site information.
+class DerivedTestingProfile : public TestingProfile {
+ public:
+ DerivedTestingProfile(Profile* profile) : original_profile_(profile) {
+ }
+
+ virtual ProfileId GetRuntimeId() {
+ return original_profile_->GetRuntimeId();
+ }
+
+ protected:
+ Profile* original_profile_;
+};
+
#endif // CHROME_TEST_TESTING_PROFILE_H_
« no previous file with comments | « chrome/browser/profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698