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

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

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 11 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 5c1ccf2e131e551e4bdfab937ebaee789b3f4096..e9800b7d2727bbfbbe1122744dfa50ae784c2d3f 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -206,11 +206,12 @@ TestingProfile::TestingProfile(
const FilePath& path,
Delegate* delegate,
scoped_refptr<ExtensionSpecialStoragePolicy> extension_policy,
- scoped_ptr<PrefServiceSyncable> prefs)
+ scoped_ptr<PrefServiceSyncable> prefs,
+ bool off_the_record)
: start_time_(Time::Now()),
prefs_(prefs.release()),
testing_prefs_(NULL),
- incognito_(false),
+ incognito_(off_the_record),
last_session_exited_cleanly_(true),
extension_special_storage_policy_(extension_policy),
profile_path_(path),
@@ -761,7 +762,8 @@ Profile::ExitType TestingProfile::GetLastSessionExitType() {
TestingProfile::Builder::Builder()
: build_called_(false),
- delegate_(NULL) {
+ delegate_(NULL),
+ off_the_record_(false) {
}
TestingProfile::Builder::~Builder() {
@@ -785,6 +787,10 @@ void TestingProfile::Builder::SetPrefService(
pref_service_ = prefs.Pass();
}
+void TestingProfile::Builder::SetOffTheRecord() {
+ off_the_record_ = true;
+}
+
scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
DCHECK(!build_called_);
build_called_ = true;
@@ -792,5 +798,6 @@ scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
path_,
delegate_,
extension_policy_,
- pref_service_.Pass()));
+ pref_service_.Pass(),
+ off_the_record_));
}
« 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