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

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

Issue 10911073: NOT FOR COMMIT: Add DeviceInfo type and ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_
6 #define CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_
7
8 #include <string>
9 #include "base/bind.h"
10 #include "sync/protocol/sync.pb.h"
11
12 namespace browser_sync {
13
14 // A class that holds information regarding the properties of a device.
15 //
16 // These objects do not contain enough information to uniquely identify devices.
17 // Two different devices may end up generating identical DeviceInfos.
18 class DeviceInfo {
19 public:
20 DeviceInfo();
21 DeviceInfo(const std::string& client_name,
22 const std::string& chrome_version,
23 const sync_pb::SyncEnums::DeviceType device_type);
24 ~DeviceInfo();
25
26 const std::string& client_name() const;
27 const std::string& chrome_version() const;
28 sync_pb::SyncEnums::DeviceType device_type() const;
29
30 // Compares this objects fields with another.
Nicolas Zea 2012/09/17 17:54:00 "object's", "another's"
rlarocque 2012/09/19 23:03:08 Done. (will be fixed in next upload)
31 bool Equals(const DeviceInfo& other) const;
32
33 static sync_pb::SyncEnums::DeviceType GetLocalDeviceType();
34 static void CreateLocalDeviceInfo(
35 base::Callback<void(const DeviceInfo& local_info)> callback);
36
Nicolas Zea 2012/09/17 17:54:00 remove newline
rlarocque 2012/09/19 23:03:08 Done.
37
Nicolas Zea 2012/09/17 17:54:00 should we expose guid as well? (can be a TODO)
rlarocque 2012/09/19 23:03:08 I left it out intentionally. It's an opaque value
38 private:
39 static void CreateLocalDeviceInfoContinuation(
40 base::Callback<void(const DeviceInfo& local_info)> callback,
41 const std::string& session_name);
42
43 std::string client_name_;
44 std::string chrome_version_;
45 sync_pb::SyncEnums::DeviceType device_type_;
46 };
47
48 }
49
50 #endif // CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698