Remove IsRunningOnIOS6OrLater

iOS 5 hasn't been supported for several releases, so this is always
true.

BUG=300130

Review URL: https://codereview.chromium.org/349453002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278519 0039d316-1c4b-4281-b951-d872f2087c98
parent 4c972f38
...@@ -44,13 +44,9 @@ NSString* GenerateClientId() { ...@@ -44,13 +44,9 @@ NSString* GenerateClientId() {
// http://openradar.appspot.com/12377282. If this is the case, revert to // http://openradar.appspot.com/12377282. If this is the case, revert to
// generating a new one. // generating a new one.
if (!client_id || [client_id isEqualToString:kZeroUUID]) { if (!client_id || [client_id isEqualToString:kZeroUUID]) {
if (base::ios::IsRunningOnIOS6OrLater()) { client_id = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
client_id = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; if ([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()); client_id = base::SysUTF8ToNSString(ios::device_util::GetRandomId());
}
} }
return client_id; return client_id;
} }
......
...@@ -52,8 +52,7 @@ TEST_F(DeviceUtilTest, GetDeviceIdentifier) { ...@@ -52,8 +52,7 @@ TEST_F(DeviceUtilTest, GetDeviceIdentifier) {
CleanNSUserDefaultsForDeviceId(); CleanNSUserDefaultsForDeviceId();
std::string new_default_id = ios::device_util::GetDeviceIdentifier(NULL); std::string new_default_id = ios::device_util::GetDeviceIdentifier(NULL);
if (base::ios::IsRunningOnIOS6OrLater() && if (![[[[UIDevice currentDevice] identifierForVendor] UUIDString]
![[[[UIDevice currentDevice] identifierForVendor] UUIDString]
isEqualToString:@"00000000-0000-0000-0000-000000000000"]) { isEqualToString:@"00000000-0000-0000-0000-000000000000"]) {
EXPECT_EQ(default_id, new_default_id); EXPECT_EQ(default_id, new_default_id);
} else { } else {
......
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
namespace base { namespace base {
namespace ios { namespace ios {
// Returns whether the operating system is iOS 6 or later.
BASE_EXPORT bool IsRunningOnIOS6OrLater();
// Returns whether the operating system is iOS 7 or later. // Returns whether the operating system is iOS 7 or later.
BASE_EXPORT bool IsRunningOnIOS7OrLater(); BASE_EXPORT bool IsRunningOnIOS7OrLater();
......
...@@ -20,10 +20,6 @@ const int32* OSVersionAsArray() { ...@@ -20,10 +20,6 @@ const int32* OSVersionAsArray() {
namespace base { namespace base {
namespace ios { namespace ios {
bool IsRunningOnIOS6OrLater() {
return IsRunningOnOrLater(6, 0, 0);
}
bool IsRunningOnIOS7OrLater() { bool IsRunningOnIOS7OrLater() {
return IsRunningOnOrLater(7, 0, 0); return IsRunningOnOrLater(7, 0, 0);
} }
......
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
namespace ios { namespace ios {
bool IsRunningOnIOS6OrLater() {
return base::ios::IsRunningOnIOS6OrLater();
}
bool IsRunningOnOrLater(int major, int minor, int bug_fix) { bool IsRunningOnOrLater(int major, int minor, int bug_fix) {
return base::ios::IsRunningOnOrLater(major, minor, bug_fix); return base::ios::IsRunningOnOrLater(major, minor, bug_fix);
} }
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
namespace ios { namespace ios {
// Returns whether the operating system is iOS 6 or later.
bool IsRunningOnIOS6OrLater();
// Returns whether the operating system is at the given version or later. // Returns whether the operating system is at the given version or later.
bool IsRunningOnOrLater(int major, int minor, int bug_fix); bool IsRunningOnOrLater(int major, int minor, int bug_fix);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment