Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/bind.h" | 10 #include "base/bind.h" |
| 11 #include "sync/protocol/sync.pb.h" | 11 #include "sync/protocol/sync.pb.h" |
| 12 | 12 |
| 13 namespace chrome { | 13 namespace chrome { |
| 14 class VersionInfo; | 14 class VersionInfo; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace browser_sync { | 17 namespace browser_sync { |
| 18 | 18 |
| 19 // A class that holds information regarding the properties of a device. | 19 // A class that holds information regarding the properties of a device. |
| 20 // | 20 // |
| 21 // These objects do not contain enough information to uniquely identify devices. | 21 // These objects do not contain enough information to uniquely identify devices. |
| 22 // Two different devices may end up generating identical DeviceInfos. | 22 // Two different devices may end up generating identical DeviceInfos. |
| 23 class DeviceInfo { | 23 class DeviceInfo { |
| 24 public: | 24 public: |
| 25 DeviceInfo(); | |
| 26 DeviceInfo(const std::string& client_name, | 25 DeviceInfo(const std::string& client_name, |
| 27 const std::string& chrome_version, | 26 const std::string& chrome_version, |
| 28 const std::string& sync_user_agent, | 27 const std::string& sync_user_agent, |
| 29 const sync_pb::SyncEnums::DeviceType device_type); | 28 const sync_pb::SyncEnums::DeviceType device_type); |
| 30 ~DeviceInfo(); | 29 ~DeviceInfo(); |
| 31 | 30 |
| 32 const std::string& client_name() const; | 31 const std::string& client_name() const; |
| 33 const std::string& chrome_version() const; | 32 const std::string& chrome_version() const; |
| 34 const std::string& sync_user_agent() const; | 33 const std::string& sync_user_agent() const; |
| 35 sync_pb::SyncEnums::DeviceType device_type() const; | 34 sync_pb::SyncEnums::DeviceType device_type() const; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 48 const chrome::VersionInfo& version_info); | 47 const chrome::VersionInfo& version_info); |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 static void CreateLocalDeviceInfoContinuation( | 50 static void CreateLocalDeviceInfoContinuation( |
| 52 base::Callback<void(const DeviceInfo& local_info)> callback, | 51 base::Callback<void(const DeviceInfo& local_info)> callback, |
| 53 const std::string& session_name); | 52 const std::string& session_name); |
| 54 | 53 |
| 55 const std::string client_name_; | 54 const std::string client_name_; |
| 56 const std::string chrome_version_; | 55 const std::string chrome_version_; |
| 57 const std::string sync_user_agent_; | 56 const std::string sync_user_agent_; |
| 58 const sync_pb::SyncEnums::DeviceType device_type_; | 57 const sync_pb::SyncEnums::DeviceType device_type_; |
|
Nicolas Zea
2012/11/16 19:42:27
disallow copy and assign? Or if you do allow them,
rlarocque
2012/11/17 00:07:21
Disallowed.
| |
| 59 }; | 58 }; |
| 60 | 59 |
| 61 } | 60 } |
| 62 | 61 |
| 63 #endif // CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_ | 62 #endif // CHROME_BROWSER_SYNC_GLUE_DEVICE_INFO_H_ |
| OLD | NEW |