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

Side by Side Diff: ios/chrome/app/spotlight/spotlight_util.mm

Issue 2704193002: [ObjC ARC] Converts ios/chrome/app/spotlight:spotlight to ARC. (Closed)
Patch Set: s/unsafe/weak Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #import "ios/chrome/app/spotlight/spotlight_util.h" 5 #import "ios/chrome/app/spotlight/spotlight_util.h"
6 6
7 #import <CoreSpotlight/CoreSpotlight.h> 7 #import <CoreSpotlight/CoreSpotlight.h>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
11 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 11 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
12 #include "ios/public/provider/chrome/browser/spotlight/spotlight_provider.h" 12 #include "ios/public/provider/chrome/browser/spotlight/spotlight_provider.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 #if !defined(__has_feature) || !__has_feature(objc_arc)
16 #error "This file requires ARC support."
17 #endif
18
15 namespace { 19 namespace {
16 // This enum is used for Histogram. Items should not be removed or reordered and 20 // This enum is used for Histogram. Items should not be removed or reordered and
17 // this enum should be kept synced with histograms.xml. 21 // this enum should be kept synced with histograms.xml.
18 // The three states correspond to: 22 // The three states correspond to:
19 // - SPOTLIGHT_UNSUPPORTED: Framework CoreSpotlight is not found and 23 // - SPOTLIGHT_UNSUPPORTED: Framework CoreSpotlight is not found and
20 // [CSSearchableIndex class] returns nil. 24 // [CSSearchableIndex class] returns nil.
21 // - SPOTLIGHT_UNAVAILABLE: Framework is loaded but [CSSearchableIndex 25 // - SPOTLIGHT_UNAVAILABLE: Framework is loaded but [CSSearchableIndex
22 // isIndexingAvailable] return NO. Note: It is unclear if this state is 26 // isIndexingAvailable] return NO. Note: It is unclear if this state is
23 // reachable (I could not find configuration where CoreSpotlight was loaded but 27 // reachable (I could not find configuration where CoreSpotlight was loaded but
24 // [CSSearchableIndex isIndexingAvailable] returned NO. 28 // [CSSearchableIndex isIndexingAvailable] returned NO.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 211 }
208 } 212 }
209 completion(nil); 213 completion(nil);
210 214
211 }]; 215 }];
212 216
213 [query start]; 217 [query start];
214 } 218 }
215 219
216 } // namespace spotlight 220 } // namespace spotlight
OLDNEW
« no previous file with comments | « ios/chrome/app/spotlight/spotlight_manager.mm ('k') | ios/chrome/app/spotlight/topsites_spotlight_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698