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

Side by Side Diff: components/sync/model_impl/processor_entity_tracker.cc

Issue 2413313004: [Sync] Move the last things out of core/. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/model_impl/processor_entity_tracker.h" 5 #include "components/sync/model_impl/processor_entity_tracker.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "components/sync/base/time.h" 9 #include "components/sync/base/time.h"
10 #include "components/sync/core/non_blocking_sync_common.h" 10 #include "components/sync/engine/non_blocking_sync_common.h"
11 #include "components/sync/syncable/syncable_util.h" 11 #include "components/sync/syncable/syncable_util.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 namespace { 15 namespace {
16 16
17 void HashSpecifics(const sync_pb::EntitySpecifics& specifics, 17 void HashSpecifics(const sync_pb::EntitySpecifics& specifics,
18 std::string* hash) { 18 std::string* hash) {
19 DCHECK_GT(specifics.ByteSize(), 0); 19 DCHECK_GT(specifics.ByteSize(), 0);
20 base::Base64Encode(base::SHA1HashString(specifics.SerializeAsString()), hash); 20 base::Base64Encode(base::SHA1HashString(specifics.SerializeAsString()), hash);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 void ProcessorEntityTracker::UpdateSpecificsHash( 241 void ProcessorEntityTracker::UpdateSpecificsHash(
242 const sync_pb::EntitySpecifics& specifics) { 242 const sync_pb::EntitySpecifics& specifics) {
243 if (specifics.ByteSize() > 0) { 243 if (specifics.ByteSize() > 0) {
244 HashSpecifics(specifics, metadata_.mutable_specifics_hash()); 244 HashSpecifics(specifics, metadata_.mutable_specifics_hash());
245 } else { 245 } else {
246 metadata_.clear_specifics_hash(); 246 metadata_.clear_specifics_hash();
247 } 247 }
248 } 248 }
249 249
250 } // namespace syncer 250 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/model_impl/DEPS ('k') | components/sync/model_impl/processor_entity_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698