summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/sync_backend_host.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 20:26:59 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 20:26:59 +0000
commit48a98b382c7dd08e15aa794dad2eb28dcc75a8d8 (patch)
treedb33735092abbbea43d8f60776cd691cacbb2983 /chrome/browser/sync/glue/sync_backend_host.cc
parentadace3f3a1306c0986936444574d84611a4bfa26 (diff)
downloadchromium_src-48a98b382c7dd08e15aa794dad2eb28dcc75a8d8.zip
chromium_src-48a98b382c7dd08e15aa794dad2eb28dcc75a8d8.tar.gz
chromium_src-48a98b382c7dd08e15aa794dad2eb28dcc75a8d8.tar.bz2
Take 2 - Get password sync to a usable state.
Plumb the gaia password up to the cryptographer to generate an encryption key. Add NIGORI to the list of active datatypes to request if enable-sync-passwords is specified. Also fixes behavior from bug 55501 (required adding ExtraChangeRecordData to syncapi), as well as an ADD-handling bug in ApplyChangesFromSyncModel. Add back the call to Cryptographer::Bootstrap which was mistakenly removed in auth refactor. This patch doesn't have necessary UI to handle secondary passphrases, password changes, or existing user upgrades. Only unsynced profiles can currently get password sync working. BUG=48702, 32410, 55501 TEST=ProfileSyncPasswordTest, upcoming password integration tests Review URL: http://codereview.chromium.org/3441009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/sync_backend_host.cc')
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 1df0905..149f5c4 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/task.h"
#include "base/utf_string_conversions.h"
@@ -21,6 +22,7 @@
#include "chrome/browser/sync/glue/http_bridge.h"
#include "chrome/browser/sync/glue/password_model_worker.h"
#include "chrome/browser/sync/sessions/session_state.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/notification_service.h"
@@ -102,7 +104,7 @@ void SyncBackendHost::Initialize(
registrar_.workers[GROUP_PASSWORD] =
new PasswordModelWorker(password_store);
} else {
- LOG(ERROR) << "Password store not initialized, cannot sync passwords";
+ LOG(WARNING) << "Password store not initialized, cannot sync passwords";
}
// Any datatypes that we want the syncer to pull down must
@@ -113,6 +115,13 @@ void SyncBackendHost::Initialize(
registrar_.routing_info[(*it)] = GROUP_PASSIVE;
}
+ // TODO(tim): This should be encryption-specific instead of passwords
+ // specific. For now we have to do this to avoid NIGORI node lookups when
+ // we haven't downloaded that node.
+ if (profile_->GetPrefs()->GetBoolean(prefs::kSyncPasswords) ) {
+ registrar_.routing_info[syncable::NIGORI] = GROUP_PASSIVE;
+ }
+
InitCore(Core::DoInitializeOptions(
sync_service_url,
MakeHttpBridgeFactory(baseline_context_getter),