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

Unified Diff: base/ios/device_util.mm

Issue 318013003: Reverted !client_id check because it caused unit test failure. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/ios/device_util.mm
diff --git a/base/ios/device_util.mm b/base/ios/device_util.mm
index c3e9c2079fe5a92ad03f0c15952893af52c78d99..c345e5e316da91bee4a101ed8788298a1927ed01 100644
--- a/base/ios/device_util.mm
+++ b/base/ios/device_util.mm
@@ -46,7 +46,7 @@ NSString* GenerateClientId() {
if (!client_id || [client_id isEqualToString:kZeroUUID]) {
if (base::ios::IsRunningOnIOS6OrLater()) {
client_id = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
- if (!client_id || [client_id isEqualToString:kZeroUUID])
+ if ([client_id isEqualToString:kZeroUUID])
client_id = base::SysUTF8ToNSString(ios::device_util::GetRandomId());
} else {
client_id = base::SysUTF8ToNSString(ios::device_util::GetRandomId());
@@ -163,7 +163,6 @@ std::string GetDeviceIdentifier(const char* salt) {
std::string GetSaltedString(const std::string& in_string,
const std::string& salt) {
- DCHECK(in_string.length());
DCHECK(salt.length());
NSData* hash_data = [base::SysUTF8ToNSString(in_string + salt)
dataUsingEncoding:NSUTF8StringEncoding];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698