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

Unified Diff: chrome/browser/sync/internal_api/write_node.cc

Issue 8468023: Move encryption related files from util folder to encryption folder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month 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
Index: chrome/browser/sync/internal_api/write_node.cc
diff --git a/chrome/browser/sync/internal_api/write_node.cc b/chrome/browser/sync/internal_api/write_node.cc
index fff3f46c43a5836ab85575c9b1aeccc1f5e6a167..3ed8144edf07905cd690120015cced581196b539 100644
--- a/chrome/browser/sync/internal_api/write_node.cc
+++ b/chrome/browser/sync/internal_api/write_node.cc
@@ -7,7 +7,7 @@
#include "base/json/json_writer.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
+#include "chrome/browser/sync/encryption/nigori_util.h"
#include "chrome/browser/sync/engine/syncapi_internal.h"
#include "chrome/browser/sync/internal_api/base_transaction.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
@@ -20,14 +20,16 @@
#include "chrome/browser/sync/protocol/theme_specifics.pb.h"
#include "chrome/browser/sync/protocol/typed_url_specifics.pb.h"
#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "chrome/browser/sync/encryption/cryptographer.h"
using browser_sync::Cryptographer;
+using browser_sync::encryption::kEncryptedString;
+using browser_sync::encryption::SpecificsNeedsEncryption;
using std::string;
using std::vector;
-using syncable::kEncryptedString;
using syncable::SPECIFICS;
+
namespace sync_api {
static const char kDefaultNameForNewNodes[] = " ";
@@ -120,7 +122,7 @@ void WriteNode::SetTitle(const std::wstring& title) {
// Only set NON_UNIQUE_NAME to the title if we're not encrypted.
Cryptographer* cryptographer = GetTransaction()->GetCryptographer();
if (cryptographer->GetEncryptedTypes().count(GetModelType()) > 0) {
- if (old_name != kEncryptedString)
+ if (old_name != browser_sync::encryption::kEncryptedString)
entry_->Put(syncable::NON_UNIQUE_NAME, kEncryptedString);
} else {
entry_->Put(syncable::NON_UNIQUE_NAME, server_legal_name);

Powered by Google App Engine
This is Rietveld 408576698