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

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

Issue 11360259: Sync: Add DeviceInfo's ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client.cc Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/sync/glue/change_processor.cc ('k') | chrome/browser/sync/glue/device_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_
6 #define CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "sync/protocol/sync.pb.h" 12 #include "sync/protocol/sync.pb.h"
12 13
13 namespace chrome { 14 namespace chrome {
14 class VersionInfo; 15 class VersionInfo;
15 } 16 }
16 17
17 namespace browser_sync { 18 namespace browser_sync {
18 19
19 // A class that holds information regarding the properties of a device. 20 // A class that holds information regarding the properties of a device.
20 // 21 //
21 // These objects do not contain enough information to uniquely identify devices. 22 // These objects do not contain enough information to uniquely identify devices.
22 // Two different devices may end up generating identical DeviceInfos. 23 // Two different devices may end up generating identical DeviceInfos.
23 class DeviceInfo { 24 class DeviceInfo {
24 public: 25 public:
25 DeviceInfo();
26 DeviceInfo(const std::string& client_name, 26 DeviceInfo(const std::string& client_name,
27 const std::string& chrome_version, 27 const std::string& chrome_version,
28 const std::string& sync_user_agent, 28 const std::string& sync_user_agent,
29 const sync_pb::SyncEnums::DeviceType device_type); 29 const sync_pb::SyncEnums::DeviceType device_type);
30 ~DeviceInfo(); 30 ~DeviceInfo();
31 31
32 const std::string& client_name() const; 32 const std::string& client_name() const;
33 const std::string& chrome_version() const; 33 const std::string& chrome_version() const;
34 const std::string& sync_user_agent() const; 34 const std::string& sync_user_agent() const;
35 sync_pb::SyncEnums::DeviceType device_type() const; 35 sync_pb::SyncEnums::DeviceType device_type() const;
(...skipping 13 matching lines...) Expand all
49 49
50 private: 50 private:
51 static void CreateLocalDeviceInfoContinuation( 51 static void CreateLocalDeviceInfoContinuation(
52 base::Callback<void(const DeviceInfo& local_info)> callback, 52 base::Callback<void(const DeviceInfo& local_info)> callback,
53 const std::string& session_name); 53 const std::string& session_name);
54 54
55 const std::string client_name_; 55 const std::string client_name_;
56 const std::string chrome_version_; 56 const std::string chrome_version_;
57 const std::string sync_user_agent_; 57 const std::string sync_user_agent_;
58 const sync_pb::SyncEnums::DeviceType device_type_; 58 const sync_pb::SyncEnums::DeviceType device_type_;
59
60 DISALLOW_COPY_AND_ASSIGN(DeviceInfo);
59 }; 61 };
60 62
61 } 63 }
62 64
63 #endif // CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_ 65 #endif // CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/change_processor.cc ('k') | chrome/browser/sync/glue/device_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698