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

Side by Side Diff: components/sync/device_info/device_info_util.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_UTIL_H_ 5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_UTIL_H_
6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_UTIL_H_ 6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 11
12 namespace sync_pb { 12 namespace sync_pb {
13 class DeviceInfoSpecifics; 13 class DeviceInfoSpecifics;
14 } 14 }
15 15
16 namespace syncer { 16 namespace sync_driver {
17 17
18 // This class contains constants and static helper functions that are shared 18 // This class contains constants and static helper functions that are shared
19 // between DeviceInfoSyncService and DeviceInfoService. 19 // between DeviceInfoSyncService and DeviceInfoService.
20 class DeviceInfoUtil { 20 class DeviceInfoUtil {
21 public: 21 public:
22 // The prefix to be appended before the cache guid when creating tags. This is 22 // The prefix to be appended before the cache guid when creating tags. This is
23 // needed for backwards compatiblity with all old clients because we need to 23 // needed for backwards compatiblity with all old clients because we need to
24 // ensure everyone uses the same logic to generate the tag, so that everyone 24 // ensure everyone uses the same logic to generate the tag, so that everyone
25 // can independently hash the tag to the same value. 25 // can independently hash the tag to the same value.
26 static const char kClientTagPrefix[]; 26 static const char kClientTagPrefix[];
(...skipping 19 matching lines...) Expand all
46 static bool IsActive(const base::Time last_update, const base::Time now); 46 static bool IsActive(const base::Time last_update, const base::Time now);
47 47
48 // Formats ClientTag from DeviceInfoSpecifics. 48 // Formats ClientTag from DeviceInfoSpecifics.
49 static std::string SpecificsToTag( 49 static std::string SpecificsToTag(
50 const sync_pb::DeviceInfoSpecifics& specifics); 50 const sync_pb::DeviceInfoSpecifics& specifics);
51 51
52 // Extracts cache_guid from ClientTag. 52 // Extracts cache_guid from ClientTag.
53 static std::string TagToCacheGuid(const std::string& tag); 53 static std::string TagToCacheGuid(const std::string& tag);
54 }; 54 };
55 55
56 } // namespace syncer 56 } // namespace sync_driver
57 57
58 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_UTIL_H_ 58 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_UTIL_H_
OLDNEW
« no previous file with comments | « components/sync/device_info/device_info_tracker.h ('k') | components/sync/device_info/device_info_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698