diff options
author | shreyasv <shreyasv@chromium.org> | 2015-05-29 11:11:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-29 18:11:36 +0000 |
commit | 70fcdc97f0f389e70bfcfcec4786b13d6a06bdba (patch) | |
tree | 437f92f666f11566f50853dd18847a25b792eec8 | |
parent | 100b5ba06a37d2e88c759679e0110b108efde2f9 (diff) | |
download | chromium_src-70fcdc97f0f389e70bfcfcec4786b13d6a06bdba.zip chromium_src-70fcdc97f0f389e70bfcfcec4786b13d6a06bdba.tar.gz chromium_src-70fcdc97f0f389e70bfcfcec4786b13d6a06bdba.tar.bz2 |
Setting QoS for NSOperationQueue only on iOS8+
According to the documentation this API is available only on iOS8+.
BUG=493725
Review URL: https://codereview.chromium.org/1164453004
Cr-Commit-Position: refs/heads/master@{#332011}
-rw-r--r-- | ios/web/crw_browsing_data_store.mm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ios/web/crw_browsing_data_store.mm b/ios/web/crw_browsing_data_store.mm index 8a96d4a..0fc0bf44 100644 --- a/ios/web/crw_browsing_data_store.mm +++ b/ios/web/crw_browsing_data_store.mm @@ -6,6 +6,7 @@ #import <Foundation/Foundation.h> +#include "base/ios/ios_util.h" #import "base/ios/weak_nsobject.h" #include "base/logging.h" #import "base/mac/scoped_nsobject.h" @@ -104,8 +105,10 @@ enum OperationType { [[NSOperationQueue alloc] init]; [operationQueueForStashAndRestoreOperations setMaxConcurrentOperationCount:1U]; - [operationQueueForStashAndRestoreOperations - setQualityOfService:NSQualityOfServiceUserInteractive]; + if (base::ios::IsRunningOnIOS8OrLater()) { + [operationQueueForStashAndRestoreOperations + setQualityOfService:NSQualityOfServiceUserInteractive]; + } }); return operationQueueForStashAndRestoreOperations; } @@ -117,8 +120,10 @@ enum OperationType { operationQueueForRemoveOperations = [[NSOperationQueue alloc] init]; [operationQueueForRemoveOperations setMaxConcurrentOperationCount:NSUIntegerMax]; - [operationQueueForRemoveOperations - setQualityOfService:NSQualityOfServiceUserInitiated]; + if (base::ios::IsRunningOnIOS8OrLater()) { + [operationQueueForRemoveOperations + setQualityOfService:NSQualityOfServiceUserInitiated]; + } }); return operationQueueForRemoveOperations; } |