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

Side by Side Diff: components/sync/device_info/device_info.h

Issue 2287733002: Switch //components away from base::ListValue::Append(Value*) overload. (Closed)
Patch Set: rebase Created 4 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 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_H_ 5 #ifndef COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_H_
6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_H_ 6 #define COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 bool Equals(const DeviceInfo& other) const; 65 bool Equals(const DeviceInfo& other) const;
66 66
67 // Apps can set ids for a device that is meaningful to them but 67 // Apps can set ids for a device that is meaningful to them but
68 // not unique enough so the user can be tracked. Exposing |guid| 68 // not unique enough so the user can be tracked. Exposing |guid|
69 // would lead to a stable unique id for a device which can potentially 69 // would lead to a stable unique id for a device which can potentially
70 // be used for tracking. 70 // be used for tracking.
71 void set_public_id(const std::string& id); 71 void set_public_id(const std::string& id);
72 72
73 // Converts the |DeviceInfo| values to a JS friendly DictionaryValue, 73 // Converts the |DeviceInfo| values to a JS friendly DictionaryValue,
74 // which extension APIs can expose to third party apps. 74 // which extension APIs can expose to third party apps.
75 base::DictionaryValue* ToValue(); 75 std::unique_ptr<base::DictionaryValue> ToValue();
76 76
77 private: 77 private:
78 const std::string guid_; 78 const std::string guid_;
79 79
80 const std::string client_name_; 80 const std::string client_name_;
81 81
82 const std::string chrome_version_; 82 const std::string chrome_version_;
83 83
84 const std::string sync_user_agent_; 84 const std::string sync_user_agent_;
85 85
86 const sync_pb::SyncEnums::DeviceType device_type_; 86 const sync_pb::SyncEnums::DeviceType device_type_;
87 87
88 std::string signin_scoped_device_id_; 88 std::string signin_scoped_device_id_;
89 89
90 // Exposing |guid| would lead to a stable unique id for a device which 90 // Exposing |guid| would lead to a stable unique id for a device which
91 // can potentially be used for tracking. Public ids are privacy safe 91 // can potentially be used for tracking. Public ids are privacy safe
92 // ids in that the same device will have different id for different apps 92 // ids in that the same device will have different id for different apps
93 // and they are also reset when app/extension is uninstalled. 93 // and they are also reset when app/extension is uninstalled.
94 std::string public_id_; 94 std::string public_id_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(DeviceInfo); 96 DISALLOW_COPY_AND_ASSIGN(DeviceInfo);
97 }; 97 };
98 98
99 } // namespace sync_driver 99 } // namespace sync_driver
100 100
101 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_H_ 101 #endif // COMPONENTS_SYNC_DEVICE_INFO_DEVICE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698