summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 23:39:45 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 23:39:45 +0000
commit2e610e9cd18750dc905a4f4feea8f5478256a28d (patch)
tree685d63f02c60fcab072651e34158daae8eda2b7f
parent42930de46c386ff5104138d003486bd12a78c45f (diff)
downloadchromium_src-2e610e9cd18750dc905a4f4feea8f5478256a28d.zip
chromium_src-2e610e9cd18750dc905a4f4feea8f5478256a28d.tar.gz
chromium_src-2e610e9cd18750dc905a4f4feea8f5478256a28d.tar.bz2
Further tweaks to the passphrase UI to deal with passphrase entry.
BUG=62103 TEST=none Review URL: http://codereview.chromium.org/6309002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71381 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd19
-rw-r--r--chrome/browser/sync/profile_sync_service.cc21
-rw-r--r--chrome/browser/sync/profile_sync_service.h26
-rw-r--r--chrome/browser/sync/profile_sync_service_password_unittest.cc2
-rw-r--r--chrome/browser/sync/resources/configure.html4
-rw-r--r--chrome/browser/sync/resources/passphrase.html45
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc28
-rw-r--r--chrome/browser/sync/sync_setup_flow.h7
-rw-r--r--chrome/browser/sync/sync_setup_wizard.cc10
-rw-r--r--chrome/test/live_sync/two_client_live_passwords_sync_test.cc18
10 files changed, 124 insertions, 56 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 561251a..d67bebf 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -8676,7 +8676,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
Sync
</message>
<message name="IDS_SYNC_NTP_SYNC_SECTION_ERROR_TITLE" desc="The title to display in the New Tab Page sync status section in case of an error.">
- Sync needs your attention!
+ Sync needs your attention
</message>
<message name="IDS_SYNC_NTP_SYNC_SECTION_PROMO_TITLE" desc="The title to display in the New Tab Page sync status section in case of a promotion.">
New!
@@ -8763,10 +8763,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
Use a sync passphrase to encrypt my data
</message>
<message name="IDS_SYNC_PASSPHRASE_WARNING" desc="Warning message about using a passphrase for sync.">
- You are currently using a passphrase. If you have forgotten your passphrase, you can reset sync to clear your synced data from Google's servers using the Google Privacy Dashboard.
+ You are currently using a passphrase. If you have forgotten your passphrase, you can reset sync to clear your synced data from Google's servers using the Google Dashboard.
</message>
<message name="IDS_SYNC_CLEAR_DATA_LINK" desc="Link to the Google Dashboard.">
- Go to Google Privacy Dashboard
+ Visit the Google Dashboard
</message>
<!-- Passphrase dialog strings -->
@@ -8774,7 +8774,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
Enter your passphrase
</message>
<message name="IDS_SYNC_ENTER_PASSPHRASE_BODY" desc="Instructions for the dialog where the user enters the passphrase.">
- Your sync data has been encrypted using a passphrase. Please enter your passphrase to decrypt the data.
+ You already have data that is encrypted with a custom passphrase, please enter it below.
+ </message>
+ <message name="IDS_SYNC_ENTER_OTHER_PASSPHRASE_BODY" desc="Instructions for the dialog where the user needs to enter a different passphrase.">
+ The passphrase you entered can't be used because you already have data encrypted with a custom passphrase. Please enter your existing passphrase below.
</message>
<message name="IDS_SYNC_PASSPHRASE_LABEL" desc="Label for the passphrase field.">
Passphrase:
@@ -8788,7 +8791,13 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_SYNC_PASSPHRASE_MISMATCH_ERROR" desc="Error message when the passphrase and confirmation don't match.">
You must enter the same passphrase twice.
</message>
-
+ <message name="IDS_SYNC_INCORRECT_PASSPHRASE" desc="Message when the passphrase is incorrect.">
+ The passphrase you entered is incorrect.
+ </message>
+ <message name="IDS_SYNC_PASSPHRASE_RECOVER" desc="Message about how to recover from a lost passphrase.">
+ If you've forgotten your passphrase, stop and reset Sync via the Google Dashboard.
+ </message>
+
<!-- Login dialog strings -->
<message name="IDS_SYNC_MY_BOOKMARKS_LABEL" desc="Title of the sync login dialog.">
Set up sync
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 094eee4..0fdd265 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -66,6 +66,8 @@ ProfileSyncService::ProfileSyncService(ProfileSyncFactory* factory,
Profile* profile,
const std::string& cros_user)
: last_auth_error_(AuthError::None()),
+ tried_creating_explicit_passphrase_(false),
+ tried_setting_explicit_passphrase_(false),
observed_passphrase_required_(false),
passphrase_required_for_decryption_(false),
factory_(factory),
@@ -1013,13 +1015,20 @@ void ProfileSyncService::DeactivateDataType(
}
void ProfileSyncService::SetPassphrase(const std::string& passphrase,
- bool is_explicit) {
+ bool is_explicit,
+ bool is_creation) {
if (ShouldPushChanges() || observed_passphrase_required_) {
backend_->SetPassphrase(passphrase, is_explicit);
} else {
cached_passphrase_.value = passphrase;
cached_passphrase_.is_explicit = is_explicit;
+ cached_passphrase_.is_creation = is_creation;
}
+
+ if (is_explicit && is_creation)
+ tried_creating_explicit_passphrase_ = true;
+ else if (is_explicit)
+ tried_setting_explicit_passphrase_ = true;
}
void ProfileSyncService::Observe(NotificationType type,
@@ -1047,7 +1056,8 @@ void ProfileSyncService::Observe(NotificationType type,
if (!cached_passphrase_.value.empty()) {
// Don't hold on to the passphrase in raw form longer than needed.
SetPassphrase(cached_passphrase_.value,
- cached_passphrase_.is_explicit);
+ cached_passphrase_.is_explicit,
+ cached_passphrase_.is_creation);
cached_passphrase_ = CachedPassphrase();
}
@@ -1066,7 +1076,8 @@ void ProfileSyncService::Observe(NotificationType type,
if (!cached_passphrase_.value.empty()) {
SetPassphrase(cached_passphrase_.value,
- cached_passphrase_.is_explicit);
+ cached_passphrase_.is_explicit,
+ cached_passphrase_.is_creation);
cached_passphrase_ = CachedPassphrase();
break;
}
@@ -1095,6 +1106,8 @@ void ProfileSyncService::Observe(NotificationType type,
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
observed_passphrase_required_ = false;
+ tried_setting_explicit_passphrase_ = false;
+ tried_creating_explicit_passphrase_ = false;
wizard_.Step(SyncSetupWizard::DONE);
break;
@@ -1120,7 +1133,7 @@ void ProfileSyncService::Observe(NotificationType type,
// actually change), or the user has an explicit passphrase set so this
// becomes a no-op.
tried_implicit_gaia_remove_when_bug_62103_fixed_ = true;
- SetPassphrase(successful->password, false);
+ SetPassphrase(successful->password, false, true);
break;
}
case NotificationType::GOOGLE_SIGNIN_FAILED: {
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 62a8e07..9b2e98d 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -256,6 +256,14 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
return is_auth_in_progress_;
}
+ bool tried_creating_explicit_passphrase() const {
+ return tried_creating_explicit_passphrase_;
+ }
+
+ bool tried_setting_explicit_passphrase() const {
+ return tried_setting_explicit_passphrase_;
+ }
+
bool observed_passphrase_required() const {
return observed_passphrase_required_;
}
@@ -364,7 +372,12 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// setting a passphrase as opposed to implicitly (from the users' perspective)
// using their Google Account password. An implicit SetPassphrase will *not*
// *not* override an explicit passphrase set previously.
- virtual void SetPassphrase(const std::string& passphrase, bool is_explicit);
+ // |is_creation| is true if the call is in response to the user setting
+ // up a new passphrase, and false if it's being set in response to a prompt
+ // for an existing passphrase.
+ virtual void SetPassphrase(const std::string& passphrase,
+ bool is_explicit,
+ bool is_creation);
// Returns whether processing changes is allowed. Check this before doing
// any model-modifying operations.
@@ -417,6 +430,14 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// Cache of the last name the client attempted to authenticate.
std::string last_attempted_user_email_;
+ // Whether the user has tried creating an explicit passphrase on this
+ // machine.
+ bool tried_creating_explicit_passphrase_;
+
+ // Whether the user has tried setting an explicit passphrase on this
+ // machine.
+ bool tried_setting_explicit_passphrase_;
+
// Whether we have seen a SYNC_PASSPHRASE_REQUIRED since initializing the
// backend, telling us that it is safe to send a passphrase down ASAP.
bool observed_passphrase_required_;
@@ -527,7 +548,8 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
struct CachedPassphrase {
std::string value;
bool is_explicit;
- CachedPassphrase() : is_explicit(false) {}
+ bool is_creation;
+ CachedPassphrase() : is_explicit(false), is_creation(false) {}
};
CachedPassphrase cached_passphrase_;
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 899b40c..632c3d9 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -191,7 +191,7 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
NotificationType(NotificationType::SYNC_CONFIGURE_DONE),
_,_)).
WillOnce(QuitUIMessageLoop());
- service_->SetPassphrase("foo", false);
+ service_->SetPassphrase("foo", false, true);
MessageLoop::current()->Run();
}
}
diff --git a/chrome/browser/sync/resources/configure.html b/chrome/browser/sync/resources/configure.html
index a728643..9ca66b9 100644
--- a/chrome/browser/sync/resources/configure.html
+++ b/chrome/browser/sync/resources/configure.html
@@ -424,10 +424,10 @@ html[os='mac'] input[type='submit'] {
emptyError.style.display = "none";
mismatchError.style.display = "none";
- if (getRadioCheckedValue() != "explicit") {
+ var f = document.getElementById("chooseDataTypesForm");
+ if (getRadioCheckedValue() != "explicit" || f.option[0].disabled) {
return true;
}
- var f = document.getElementById("chooseDataTypesForm");
if (f.passphrase.value.length == 0) {
emptyError.style.display = "block";
return false;
diff --git a/chrome/browser/sync/resources/passphrase.html b/chrome/browser/sync/resources/passphrase.html
index 55b633c..251b0ee 100644
--- a/chrome/browser/sync/resources/passphrase.html
+++ b/chrome/browser/sync/resources/passphrase.html
@@ -19,8 +19,9 @@ form {
font-weight: bold;
margin-bottom: 10px;
}
-.sync-instructions {
+.sync-instructions-start-hidden {
margin-top: 10px;
+ display: none;
}
.sync-footer {
position: fixed;
@@ -44,16 +45,19 @@ html[os='mac'] input[type='button'],
html[os='mac'] input[type='submit'] {
font-size: 12pt;
}
-
#passphrase-input {
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
+#incorrectPassphrase {
margin-top: 5px;
- margin-bottom: 50px;
+}
+.error {
+ color: red;
}
</style>
<script src="chrome://resources/js/cr.js"></script>
<script>
- var currentMode;
-
// Called once, when this html/js is loaded.
function setupPassphraseDialog(args) {
// Allow platform specific rules
@@ -62,12 +66,25 @@ html[os='mac'] input[type='submit'] {
} else if (!cr.isWindows) {
document.documentElement.setAttribute('os', 'linux');
}
+
+ document.getElementById("passphraseRejectedBody").style.display = "none";
+ document.getElementById("normalBody").style.display = "none";
+ document.getElementById("incorrectPassphrase").style.display = "none";
+
+ if (args["passphrase_creation_rejected"]) {
+ document.getElementById("passphraseRejectedBody").style.display = "block";
+ } else {
+ document.getElementById("normalBody").style.display = "block";
+ }
+
+ if (args["passphrase_setting_rejected"]) {
+ document.getElementById("incorrectPassphrase").style.display = "block";
+ }
}
function sendPassphraseAndClose() {
var f = document.getElementById("passphraseForm");
- var result = JSON.stringify({"passphrase": f.passphrase.value,
- "mode": currentMode});
+ var result = JSON.stringify({"passphrase": f.passphrase.value});
chrome.send("Passphrase", [result]);
}
@@ -78,14 +95,16 @@ html[os='mac'] input[type='submit'] {
</script>
</head>
<body i18n-values=".style.fontFamily:fontfamily"
- onload="setupPassphraseDialog();">
+ onload="setupPassphraseDialog(JSON.parse(chrome.dialogArguments));">
<form id="passphraseForm"
onSubmit="sendPassphraseAndClose(); return false;">
<div id="enter-passphrase">
<div class="sync-header" id="enterTitle"
i18n-content="enterPassphraseTitle"></div>
- <div class="sync-instructions" id="enterInstructions"
+ <div class="sync-instructions-start-hidden" id="normalBody"
i18n-content="enterPassphraseBody"></div>
+ <div class="sync-instructions-start-hidden" id="passphraseRejectedBody"
+ i18n-content="enterOtherPassphraseBody"></div>
</div>
<div id="passphrase-input">
@@ -93,11 +112,13 @@ html[os='mac'] input[type='submit'] {
for="passphrase" i18n-content="passphraseLabel">
</label>
<input id="passphrase" name="passphrase" type="password" />
+ <div class="error" id="incorrectPassphrase"
+ i18n-content="incorrectPassphrase">
+ </div>
</div>
- <div id="sync-passphrase-warning" i18n-content="passphraseWarning">
- </div>
- <a id="clear-data-link" i18n-content="cleardatalink" href="#"
+ <span id="sync-passphrase-warning" i18n-content="passphraseRecover">
+ </span> <a id="clear-data-link" i18n-content="cleardatalink" href="#"
onclick='goToDashboard(); return false;'></a>
<div class="sync-footer">
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 083b8d8..3c2fe94 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -69,15 +69,13 @@ static bool GetAuthData(const std::string& json,
return true;
}
-bool GetPassphrase(const std::string& json, std::string* passphrase,
- std::string* mode) {
+bool GetPassphrase(const std::string& json, std::string* passphrase) {
scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false));
if (!parsed_value.get() || !parsed_value->IsType(Value::TYPE_DICTIONARY))
return false;
DictionaryValue* result = static_cast<DictionaryValue*>(parsed_value.get());
- return result->GetString("passphrase", passphrase) &&
- result->GetString("mode", mode);
+ return result->GetString("passphrase", passphrase);
}
bool GetFirstPassphrase(const std::string& json,
@@ -212,15 +210,14 @@ void FlowHandler::HandlePassphraseEntry(const ListValue* args) {
return;
std::string passphrase;
- std::string mode;
- if (!GetPassphrase(json, &passphrase, &mode)) {
+ if (!GetPassphrase(json, &passphrase)) {
// Couldn't understand what the page sent. Indicates a programming error.
NOTREACHED();
return;
}
DCHECK(flow_);
- flow_->OnPassphraseEntry(passphrase, mode);
+ flow_->OnPassphraseEntry(passphrase);
}
void FlowHandler::HandleFirstPassphrase(const ListValue* args) {
@@ -480,10 +477,10 @@ void SyncSetupFlow::GetArgsForGaiaLogin(const ProfileSyncService* service,
void SyncSetupFlow::GetArgsForEnterPassphrase(
const ProfileSyncService* service, DictionaryValue* args) {
args->SetString("iframeToShow", "passphrase");
- if (service->IsUsingSecondaryPassphrase())
- args->SetString("mode", "enter");
- else
- args->SetString("mode", "gaia");
+ args->SetBoolean("passphrase_creation_rejected",
+ service->tried_creating_explicit_passphrase());
+ args->SetBoolean("passphrase_setting_rejected",
+ service->tried_setting_explicit_passphrase());
}
// static
@@ -726,24 +723,23 @@ void SyncSetupFlow::OnUserConfigured(const SyncConfiguration& configuration) {
if (configuration.use_secondary_passphrase &&
!service_->IsUsingSecondaryPassphrase()) {
- service_->SetPassphrase(configuration.secondary_passphrase, true);
+ service_->SetPassphrase(configuration.secondary_passphrase, true, true);
}
service_->OnUserChoseDatatypes(configuration.sync_everything,
configuration.data_types);
}
-void SyncSetupFlow::OnPassphraseEntry(const std::string& passphrase,
- const std::string& mode) {
+void SyncSetupFlow::OnPassphraseEntry(const std::string& passphrase) {
Advance(SyncSetupWizard::SETTING_UP);
- service_->SetPassphrase(passphrase, true);
+ service_->SetPassphrase(passphrase, true, false);
}
void SyncSetupFlow::OnFirstPassphraseEntry(const std::string& option,
const std::string& passphrase) {
Advance(SyncSetupWizard::SETTING_UP);
if (option == "explicit") {
- service_->SetPassphrase(passphrase, true);
+ service_->SetPassphrase(passphrase, true, true);
} else if (option == "nothanks") {
// User opted out of encrypted sync, need to turn off encrypted
// data types.
diff --git a/chrome/browser/sync/sync_setup_flow.h b/chrome/browser/sync/sync_setup_flow.h
index f6c0233..b47c103 100644
--- a/chrome/browser/sync/sync_setup_flow.h
+++ b/chrome/browser/sync/sync_setup_flow.h
@@ -107,9 +107,12 @@ class SyncSetupFlow : public HtmlDialogUIDelegate {
void OnUserConfigured(const SyncConfiguration& configuration);
- void OnPassphraseEntry(const std::string& passphrase,
- const std::string& mode);
+ // The 'passphrase' screen is used when the user is prompted to enter
+ // an existing passphrase.
+ void OnPassphraseEntry(const std::string& passphrase);
+ // The 'first passphrase' screen is for users migrating from a build
+ // without passwords, who are prompted to make a passphrase choice.
void OnFirstPassphraseEntry(const std::string& option,
const std::string& passphrase);
diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc
index 5df5536..64391c1 100644
--- a/chrome/browser/sync/sync_setup_wizard.cc
+++ b/chrome/browser/sync/sync_setup_wizard.cc
@@ -171,12 +171,16 @@ void SyncResourcesSource::StartDataRequest(const std::string& path_raw,
html_resource_id = IDR_SYNC_PASSPHRASE_HTML;
AddString(dict, "enterPassphraseTitle", IDS_SYNC_ENTER_PASSPHRASE_TITLE);
AddString(dict, "enterPassphraseBody", IDS_SYNC_ENTER_PASSPHRASE_BODY);
+ AddString(dict, "enterOtherPassphraseBody",
+ IDS_SYNC_ENTER_OTHER_PASSPHRASE_BODY);
AddString(dict, "passphraseLabel", IDS_SYNC_PASSPHRASE_LABEL);
- AddString(dict, "ok", IDS_OK);
- AddString(dict, "cancel", IDS_CANCEL);
-
+ AddString(dict, "incorrectPassphrase", IDS_SYNC_INCORRECT_PASSPHRASE);
+ AddString(dict, "passphraseRecover", IDS_SYNC_PASSPHRASE_RECOVER);
AddString(dict, "passphraseWarning", IDS_SYNC_PASSPHRASE_WARNING);
AddString(dict, "cleardatalink", IDS_SYNC_CLEAR_DATA_LINK);
+
+ AddString(dict, "ok", IDS_OK);
+ AddString(dict, "cancel", IDS_CANCEL);
} else if (path_raw == kSyncFirstPassphrasePath) {
html_resource_id = IDR_SYNC_FIRST_PASSPHRASE_HTML;
AddString(dict, "title", IDS_SYNC_FIRST_PASSPHRASE_TITLE);
diff --git a/chrome/test/live_sync/two_client_live_passwords_sync_test.cc b/chrome/test/live_sync/two_client_live_passwords_sync_test.cc
index a4299af..6e77859 100644
--- a/chrome/test/live_sync/two_client_live_passwords_sync_test.cc
+++ b/chrome/test/live_sync/two_client_live_passwords_sync_test.cc
@@ -84,11 +84,11 @@ IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, FAILS_SetPassphrase) {
IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, SetPassphrase) {
#endif
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- GetClient(0)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(0)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(0)->AwaitPassphraseAccepted();
GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1));
ASSERT_TRUE(GetClient(1)->service()->observed_passphrase_required());
- GetClient(1)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(1)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(1)->AwaitPassphraseAccepted();
ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required());
}
@@ -102,7 +102,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
SetPassphraseAndAddPassword) {
#endif
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- GetClient(0)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(0)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(0)->AwaitPassphraseAccepted();
PasswordForm form;
@@ -117,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
ASSERT_EQ(1, GetClient(1)->GetLastSessionSnapshot()->
num_conflicting_updates);
- GetClient(1)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(1)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(1)->AwaitPassphraseAccepted();
ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required());
GetClient(1)->AwaitSyncCycleCompletion("Accept passphrase and decrypt.");
@@ -131,14 +131,14 @@ IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
DISABLED_SetPassphraseAndThenSetupSync) {
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
ASSERT_TRUE(GetClient(0)->SetupSync());
- GetClient(0)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(0)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(0)->AwaitPassphraseAccepted();
GetClient(0)->AwaitSyncCycleCompletion("Initial sync.");
ASSERT_TRUE(GetClient(1)->SetupSync());
ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(GetClient(1)->service()->observed_passphrase_required());
- GetClient(1)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(1)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(1)->AwaitPassphraseAccepted();
ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required());
}
@@ -149,16 +149,16 @@ IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
DISABLED_SetPassphraseTwice) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- GetClient(0)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(0)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(0)->AwaitPassphraseAccepted();
GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1));
ASSERT_TRUE(GetClient(1)->service()->observed_passphrase_required());
- GetClient(1)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(1)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(1)->AwaitPassphraseAccepted();
ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required());
- GetClient(1)->service()->SetPassphrase(kValidPassphrase, true);
+ GetClient(1)->service()->SetPassphrase(kValidPassphrase, true, true);
GetClient(1)->AwaitPassphraseAccepted();
ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required());
}