| 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) &&
|
|
|