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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits and rebase to ToT. Created 7 years, 10 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/test/base/testing_profile.h ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 970d62970da44d785419932d9f9d6d72aa4fa8ac..3ccee1a7dba8b6f355cc98f905a05ad9cb5dc79d 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -163,6 +163,7 @@ TestingProfile::TestingProfile()
: start_time_(Time::Now()),
testing_prefs_(NULL),
incognito_(false),
+ original_profile_(NULL),
last_session_exited_cleanly_(true),
profile_dependency_manager_(ProfileDependencyManager::GetInstance()),
delegate_(NULL) {
@@ -177,6 +178,7 @@ TestingProfile::TestingProfile(const base::FilePath& path)
: start_time_(Time::Now()),
testing_prefs_(NULL),
incognito_(false),
+ original_profile_(NULL),
last_session_exited_cleanly_(true),
profile_path_(path),
profile_dependency_manager_(ProfileDependencyManager::GetInstance()),
@@ -190,6 +192,7 @@ TestingProfile::TestingProfile(const base::FilePath& path,
: start_time_(Time::Now()),
testing_prefs_(NULL),
incognito_(false),
+ original_profile_(NULL),
last_session_exited_cleanly_(true),
profile_path_(path),
profile_dependency_manager_(ProfileDependencyManager::GetInstance()),
@@ -213,6 +216,7 @@ TestingProfile::TestingProfile(
prefs_(prefs.release()),
testing_prefs_(NULL),
incognito_(false),
+ original_profile_(NULL),
last_session_exited_cleanly_(true),
extension_special_storage_policy_(extension_policy),
profile_path_(path),
@@ -500,6 +504,10 @@ void TestingProfile::SetOffTheRecordProfile(Profile* profile) {
incognito_profile_.reset(profile);
}
+void TestingProfile::SetOriginalProfile(Profile* profile) {
+ original_profile_ = profile;
+}
+
Profile* TestingProfile::GetOffTheRecordProfile() {
return incognito_profile_.get();
}
@@ -509,6 +517,8 @@ bool TestingProfile::HasOffTheRecordProfile() {
}
Profile* TestingProfile::GetOriginalProfile() {
+ if (original_profile_)
+ return original_profile_;
return this;
}
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698