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

Side by Side Diff: chrome/browser/sync/glue/device_info.cc

Issue 566623003: Refactor syncable DEVICE_INFO type from ChangeProcessor to SyncableService - part 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test fixes Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/sync/glue/device_info.h" 5 #include "chrome/browser/sync/glue/device_info.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/chrome_version_info.h" 10 #include "chrome/common/chrome_version_info.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 : guid_(guid), 53 : guid_(guid),
54 client_name_(client_name), 54 client_name_(client_name),
55 chrome_version_(chrome_version), 55 chrome_version_(chrome_version),
56 sync_user_agent_(sync_user_agent), 56 sync_user_agent_(sync_user_agent),
57 device_type_(device_type), 57 device_type_(device_type),
58 signin_scoped_device_id_(signin_scoped_device_id) { 58 signin_scoped_device_id_(signin_scoped_device_id) {
59 } 59 }
60 60
61 DeviceInfo::~DeviceInfo() { } 61 DeviceInfo::~DeviceInfo() { }
62 62
63 DeviceInfo* DeviceInfo::Clone() const {
64 return new DeviceInfo(guid(),
65 client_name(),
66 chrome_version(),
67 sync_user_agent(),
68 device_type(),
69 signin_scoped_device_id());
70 }
71
63 const std::string& DeviceInfo::guid() const { 72 const std::string& DeviceInfo::guid() const {
64 return guid_; 73 return guid_;
65 } 74 }
66 75
67 const std::string& DeviceInfo::client_name() const { 76 const std::string& DeviceInfo::client_name() const {
68 return client_name_; 77 return client_name_;
69 } 78 }
70 79
71 const std::string& DeviceInfo::chrome_version() const { 80 const std::string& DeviceInfo::chrome_version() const {
72 return chrome_version_; 81 return chrome_version_;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 session_name, 253 session_name,
245 version_info.CreateVersionString(), 254 version_info.CreateVersionString(),
246 MakeUserAgentForSyncApi(version_info), 255 MakeUserAgentForSyncApi(version_info),
247 GetLocalDeviceType(), 256 GetLocalDeviceType(),
248 signin_scoped_device_id); 257 signin_scoped_device_id);
249 258
250 callback.Run(local_info); 259 callback.Run(local_info);
251 } 260 }
252 261
253 } // namespace browser_sync 262 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698