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

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

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 #include "components/sync/device_info/device_info_util.h" 5 #include "components/sync/device_info/device_info_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "components/sync/protocol/sync.pb.h" 10 #include "components/sync/protocol/sync.pb.h"
11 11
12 namespace syncer { 12 namespace sync_driver {
13 13
14 using base::Time; 14 using base::Time;
15 using base::TimeDelta; 15 using base::TimeDelta;
16 using sync_pb::DeviceInfoSpecifics; 16 using sync_pb::DeviceInfoSpecifics;
17 17
18 const char DeviceInfoUtil::kClientTagPrefix[] = "DeviceInfo_"; 18 const char DeviceInfoUtil::kClientTagPrefix[] = "DeviceInfo_";
19 const TimeDelta DeviceInfoUtil::kPulseInterval = TimeDelta::FromDays(1); 19 const TimeDelta DeviceInfoUtil::kPulseInterval = TimeDelta::FromDays(1);
20 const TimeDelta DeviceInfoUtil::kActiveThreshold = TimeDelta::FromDays(14); 20 const TimeDelta DeviceInfoUtil::kActiveThreshold = TimeDelta::FromDays(14);
21 21
22 namespace { 22 namespace {
(...skipping 23 matching lines...) Expand all
46 const sync_pb::DeviceInfoSpecifics& specifics) { 46 const sync_pb::DeviceInfoSpecifics& specifics) {
47 return kClientTagPrefix + specifics.cache_guid(); 47 return kClientTagPrefix + specifics.cache_guid();
48 } 48 }
49 49
50 // static 50 // static
51 std::string DeviceInfoUtil::TagToCacheGuid(const std::string& tag) { 51 std::string DeviceInfoUtil::TagToCacheGuid(const std::string& tag) {
52 DCHECK(base::StartsWith(tag, kClientTagPrefix, base::CompareCase::SENSITIVE)); 52 DCHECK(base::StartsWith(tag, kClientTagPrefix, base::CompareCase::SENSITIVE));
53 return tag.substr(strlen(kClientTagPrefix)); 53 return tag.substr(strlen(kClientTagPrefix));
54 } 54 }
55 55
56 } // namespace syncer 56 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync/device_info/device_info_util.h ('k') | components/sync/device_info/device_info_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698