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

Side by Side Diff: base/ios/device_util.h

Issue 309963003: Refactors GetDeviceIdentifier() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | base/ios/device_util.mm » ('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 BASE_IOS_DEVICE_UTIL_H_ 5 #ifndef BASE_IOS_DEVICE_UTIL_H_
6 #define BASE_IOS_DEVICE_UTIL_H_ 6 #define BASE_IOS_DEVICE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace ios { 10 namespace ios {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Returns a random UUID. 65 // Returns a random UUID.
66 std::string GetRandomId(); 66 std::string GetRandomId();
67 67
68 // Returns an identifier for the device, using the given |salt|. A global 68 // Returns an identifier for the device, using the given |salt|. A global
69 // identifier is generated the first time this method is called, and the salt 69 // identifier is generated the first time this method is called, and the salt
70 // is used to be able to generate distinct identifiers for the same device. If 70 // is used to be able to generate distinct identifiers for the same device. If
71 // |salt| is NULL, a default value is used. Unless you are using this value for 71 // |salt| is NULL, a default value is used. Unless you are using this value for
72 // something that should be anonymous, you should probably pass NULL. 72 // something that should be anonymous, you should probably pass NULL.
73 std::string GetDeviceIdentifier(const char* salt); 73 std::string GetDeviceIdentifier(const char* salt);
74 74
75 // Returns a hashed version of |in_string| using |salt| (which must not
76 // zero-length). Different salt values should result in differently hashed
77 // strings.
78 std::string GetSaltedString(const std::string& in_string,
79 const std::string& salt);
80
75 } // namespace device_util 81 } // namespace device_util
76 } // namespace ios 82 } // namespace ios
77 83
78 #endif // BASE_IOS_DEVICE_UTIL_H_ 84 #endif // BASE_IOS_DEVICE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/ios/device_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698