summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/syncable
diff options
context:
space:
mode:
authoralbertb@chromium.org <albertb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 22:33:48 +0000
committeralbertb@chromium.org <albertb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 22:33:48 +0000
commit021ac312da721b9c8814f504da55d786c83701c5 (patch)
treef1abaecf2e194edb610a4d840baa629cd744ccb5 /chrome/browser/sync/syncable
parent7f9ca7c4d29183ad1cdb99080095e1354c7946fe (diff)
downloadchromium_src-021ac312da721b9c8814f504da55d786c83701c5.zip
chromium_src-021ac312da721b9c8814f504da55d786c83701c5.tar.gz
chromium_src-021ac312da721b9c8814f504da55d786c83701c5.tar.bz2
DRAFT: sync_api changes to support password encryption
BUG=32410 TEST=start two browsers with --enable-sync-passwords, verify that passwords do get synced between the two Review URL: http://codereview.chromium.org/2302001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/syncable')
-rw-r--r--chrome/browser/sync/syncable/directory_manager.cc5
-rw-r--r--chrome/browser/sync/syncable/directory_manager.h8
-rw-r--r--chrome/browser/sync/syncable/model_type.cc4
3 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/sync/syncable/directory_manager.cc b/chrome/browser/sync/syncable/directory_manager.cc
index 96578c0..0719c67 100644
--- a/chrome/browser/sync/syncable/directory_manager.cc
+++ b/chrome/browser/sync/syncable/directory_manager.cc
@@ -14,6 +14,8 @@
#include "chrome/browser/sync/syncable/syncable.h"
#include "chrome/common/deprecated/event_sys-inl.h"
+using browser_sync::Cryptographer;
+
namespace syncable {
static const FilePath::CharType kSyncDataDatabaseFilename[] =
@@ -37,7 +39,8 @@ const FilePath DirectoryManager::GetSyncDataDatabasePath() const {
DirectoryManager::DirectoryManager(const FilePath& path)
: root_path_(path),
managed_directory_(NULL),
- channel_(new Channel(DirectoryManagerShutdownEvent())) {
+ channel_(new Channel(DirectoryManagerShutdownEvent())),
+ cryptographer_(new Cryptographer) {
}
DirectoryManager::~DirectoryManager() {
diff --git a/chrome/browser/sync/syncable/directory_manager.h b/chrome/browser/sync/syncable/directory_manager.h
index 7753b1b..61f303e 100644
--- a/chrome/browser/sync/syncable/directory_manager.h
+++ b/chrome/browser/sync/syncable/directory_manager.h
@@ -22,6 +22,7 @@
#include "chrome/browser/sync/syncable/dir_open_result.h"
#include "chrome/browser/sync/syncable/path_name_cmp.h"
#include "chrome/browser/sync/syncable/syncable.h"
+#include "chrome/browser/sync/util/cryptographer.h"
#include "chrome/browser/sync/util/sync_types.h"
#include "chrome/common/deprecated/event_sys.h"
@@ -76,6 +77,10 @@ class DirectoryManager {
Channel* channel() const { return channel_; }
+ browser_sync::Cryptographer* cryptographer() const {
+ return cryptographer_.get();
+ }
+
protected:
DirOpenResult OpenImpl(const std::string& name, const FilePath& path,
bool* was_open);
@@ -91,8 +96,9 @@ class DirectoryManager {
Channel* const channel_;
- private:
+ scoped_ptr<browser_sync::Cryptographer> cryptographer_;
+ private:
DISALLOW_COPY_AND_ASSIGN(DirectoryManager);
};
diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc
index ea89bb1..a03a794 100644
--- a/chrome/browser/sync/syncable/model_type.cc
+++ b/chrome/browser/sync/syncable/model_type.cc
@@ -122,6 +122,10 @@ std::string ModelTypeToString(ModelType model_type) {
return "Typed URLs";
case EXTENSIONS:
return "Extensions";
+ case PASSWORDS:
+ return "Passwords";
+ case NIGORI:
+ return "Encryption keys";
default:
NOTREACHED() << "No known extension for model type.";
return "INVALID";