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

Side by Side Diff: components/sync_driver/device_info_util.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, 4 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_driver/device_info_util.h" 5 #include "components/sync_driver/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 "sync/protocol/sync.pb.h" 10 #include "components/sync/protocol/sync.pb.h"
11 11
12 namespace sync_driver { 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);
(...skipping 26 matching lines...) Expand all
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 sync_driver 56 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/device_info_sync_service_unittest.cc ('k') | components/sync_driver/device_info_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698