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

Unified Diff: components/sync/core_impl/syncapi_internal.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 months 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: components/sync/core_impl/syncapi_internal.cc
diff --git a/sync/internal_api/syncapi_internal.cc b/components/sync/core_impl/syncapi_internal.cc
similarity index 86%
rename from sync/internal_api/syncapi_internal.cc
rename to components/sync/core_impl/syncapi_internal.cc
index 0b3fd9f55c79eb97804c66b6f7b8d25e5fa85c7e..ca690bd71b82c5b785f6af4c3bb764550462997a 100644
--- a/sync/internal_api/syncapi_internal.cc
+++ b/components/sync/core_impl/syncapi_internal.cc
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/internal_api/syncapi_internal.h"
+#include "components/sync/core_impl/syncapi_internal.h"
#include <stddef.h>
#include <memory>
#include "base/macros.h"
-#include "sync/protocol/attachments.pb.h"
-#include "sync/protocol/password_specifics.pb.h"
-#include "sync/protocol/sync.pb.h"
-#include "sync/util/cryptographer.h"
+#include "components/sync/base/cryptographer.h"
+#include "components/sync/protocol/attachments.pb.h"
+#include "components/sync/protocol/password_specifics.pb.h"
+#include "components/sync/protocol/sync.pb.h"
namespace syncer {
@@ -21,11 +21,11 @@ namespace {
bool EndsWithSpace(const std::string& string) {
return !string.empty() && *string.rbegin() == ' ';
}
-
}
sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics(
- const sync_pb::EntitySpecifics& specifics, Cryptographer* crypto) {
+ const sync_pb::EntitySpecifics& specifics,
+ Cryptographer* crypto) {
if (!specifics.has_password())
return NULL;
const sync_pb::PasswordSpecifics& password_specifics = specifics.password();
@@ -42,12 +42,11 @@ sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics(
}
// The list of names which are reserved for use by the server.
-static const char* kForbiddenServerNames[] = { "", ".", ".." };
+static const char* kForbiddenServerNames[] = {"", ".", ".."};
// When taking a name from the syncapi, append a space if it matches the
// pattern of a server-illegal name followed by zero or more spaces.
-void SyncAPINameToServerName(const std::string& syncer_name,
- std::string* out) {
+void SyncAPINameToServerName(const std::string& syncer_name, std::string* out) {
*out = syncer_name;
if (IsNameServerIllegalAfterTrimming(*out))
out->append(" ");
@@ -56,8 +55,7 @@ void SyncAPINameToServerName(const std::string& syncer_name,
// In the reverse direction, if a server name matches the pattern of a
// server-illegal name followed by one or more spaces, remove the trailing
// space.
-void ServerNameToSyncAPIName(const std::string& server_name,
- std::string* out) {
+void ServerNameToSyncAPIName(const std::string& server_name, std::string* out) {
CHECK(out);
int length_to_copy = server_name.length();
if (IsNameServerIllegalAfterTrimming(server_name) &&
« no previous file with comments | « components/sync/core_impl/syncapi_internal.h ('k') | components/sync/core_impl/syncapi_server_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698