| 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_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 // Dial device information that is used within the DialService and Registry on | 23 // Dial device information that is used within the DialService and Registry on |
| 24 // the IO thread. It is updated as new information arrives and a list of | 24 // the IO thread. It is updated as new information arrives and a list of |
| 25 // DialDeviceData is copied and sent to event listeners on the UI thread. | 25 // DialDeviceData is copied and sent to event listeners on the UI thread. |
| 26 class DialDeviceData { | 26 class DialDeviceData { |
| 27 public: | 27 public: |
| 28 DialDeviceData(); | 28 DialDeviceData(); |
| 29 DialDeviceData(const std::string& device_id, | 29 DialDeviceData(const std::string& device_id, |
| 30 const GURL& device_description_url, | 30 const GURL& device_description_url, |
| 31 const base::Time& response_time); | 31 const base::Time& response_time); |
| 32 DialDeviceData(const DialDeviceData& other); |
| 32 ~DialDeviceData(); | 33 ~DialDeviceData(); |
| 33 | 34 |
| 34 bool operator==(const DialDeviceData& other_data) const { | 35 bool operator==(const DialDeviceData& other_data) const { |
| 35 return device_id_ == other_data.device_id_; | 36 return device_id_ == other_data.device_id_; |
| 36 } | 37 } |
| 37 | 38 |
| 38 const std::string& device_id() const { return device_id_; } | 39 const std::string& device_id() const { return device_id_; } |
| 39 void set_device_id(const std::string& id) { | 40 void set_device_id(const std::string& id) { |
| 40 device_id_ = id; | 41 device_id_ = id; |
| 41 } | 42 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Optional (-1 means unset). | 90 // Optional (-1 means unset). |
| 90 int max_age_; | 91 int max_age_; |
| 91 | 92 |
| 92 // Optional (-1 means unset). | 93 // Optional (-1 means unset). |
| 93 int config_id_; | 94 int config_id_; |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace extensions | 97 } // namespace extensions |
| 97 | 98 |
| 98 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ | 99 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ |
| OLD | NEW |