summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-23 23:43:58 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-23 23:43:58 +0000
commit68c63a24378be705c69720297baa45589de4a856 (patch)
treef29c94c514c6b57c15171abd54c64b872b704259 /chrome/browser/sync
parent584541289930840eb7c3efd4f425964bc49c5c25 (diff)
downloadchromium_src-68c63a24378be705c69720297baa45589de4a856.zip
chromium_src-68c63a24378be705c69720297baa45589de4a856.tar.gz
chromium_src-68c63a24378be705c69720297baa45589de4a856.tar.bz2
sync: remove old passphrase migration logic
BUG=62103 TEST=integration tests, ProfileSyncServicePasswordTest Review URL: http://codereview.chromium.org/7248011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/engine/syncapi.cc28
-rw-r--r--chrome/browser/sync/profile_sync_service.cc7
-rw-r--r--chrome/browser/sync/profile_sync_service.h9
3 files changed, 1 insertions, 43 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index d408169..6eafb87 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -1474,13 +1474,6 @@ class SyncManager::SyncInternal
void UpdateNotificationInfo(
const syncable::ModelTypePayloadMap& type_payloads);
- // Helper for migration to new nigori proto to set
- // 'using_explicit_passphrase' in the NigoriSpecifics.
- // TODO(tim): Bug 62103. Remove this after it has been pushed out to dev
- // channel users.
- void SetUsingExplicitPassphrasePrefForMigration(
- WriteTransaction* const trans);
-
// Checks for server reachabilty and requests a nudge.
void OnIPAddressChangedImpl();
@@ -1927,19 +1920,6 @@ void SyncManager::SyncInternal::RaiseAuthNeededEvent() {
OnAuthError(AuthError(AuthError::INVALID_GAIA_CREDENTIALS)));
}
-void SyncManager::SyncInternal::SetUsingExplicitPassphrasePrefForMigration(
- WriteTransaction* const trans) {
- WriteNode node(trans);
- if (!node.InitByTagLookup(kNigoriTag)) {
- // TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS.
- NOTREACHED();
- return;
- }
- sync_pb::NigoriSpecifics specifics(node.GetNigoriSpecifics());
- specifics.set_using_explicit_passphrase(true);
- node.SetNigoriSpecifics(specifics);
-}
-
void SyncManager::SyncInternal::SetPassphrase(
const std::string& passphrase, bool is_explicit) {
// We do not accept empty passphrases.
@@ -1967,14 +1947,6 @@ void SyncManager::SyncInternal::SetPassphrase(
return;
}
- // TODO(tim): If this is the first time the user has entered a passphrase
- // since the protocol changed to store passphrase preferences in the cloud,
- // make sure we update this preference. See bug 62103.
- // TODO(jhawkins): Verify that this logic may be removed now that the
- // migration is no longer supported.
- if (is_explicit)
- SetUsingExplicitPassphrasePrefForMigration(&trans);
-
// Nudge the syncer so that encrypted datatype updates that were waiting for
// this passphrase get applied as soon as possible.
RequestNudge(FROM_HERE);
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 028a5f4..f939999 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -93,8 +93,6 @@ ProfileSyncService::ProfileSyncService(ProfileSyncFactory* factory,
channel == platform_util::CHANNEL_BETA) {
sync_service_url_ = GURL(kSyncServerUrl);
}
-
- tried_implicit_gaia_remove_when_bug_62103_fixed_ = false;
}
ProfileSyncService::~ProfileSyncService() {
@@ -990,9 +988,7 @@ void ProfileSyncService::GetRegisteredDataTypes(
}
bool ProfileSyncService::IsUsingSecondaryPassphrase() const {
- return backend_.get() && (backend_->IsUsingExplicitPassphrase() ||
- (tried_implicit_gaia_remove_when_bug_62103_fixed_ &&
- IsPassphraseRequired()));
+ return backend_.get() && backend_->IsUsingExplicitPassphrase();
}
bool ProfileSyncService::IsCryptographerReady(
@@ -1275,7 +1271,6 @@ void ProfileSyncService::Observe(NotificationType type,
// update the implicit passphrase (idempotent if the passphrase didn't
// 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, true);
break;
}
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 141aec0..f4ee9c5 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -636,15 +636,6 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// TODO(lipalani): Bug 82221 unify this with the CachedPassphrase struct.
std::string gaia_password_;
- // TODO(tim): Remove this once new 'explicit passphrase' code flushes through
- // dev channel. See bug 62103.
- // To "migrate" early adopters of password sync on dev channel to the new
- // model that stores their secondary passphrase preference in the cloud, we
- // need some extra state since this cloud pref will be empty for all of them
- // regardless of how they set up sync, and we can't trust
- // kSyncUsingSecondaryPassphrase due to bugs in that implementation.
- bool tried_implicit_gaia_remove_when_bug_62103_fixed_;
-
// Keep track of where we are in a server clear operation
ClearServerDataState clear_server_data_state_;