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

Side by Side Diff: ios/chrome/common/physical_web/physical_web_scanner.mm

Issue 2443733002: Suppress the Bluetooth prompt when Chrome is launched with BT disabled (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/physical_web/physical_web_scanner.h" 5 #import "ios/chrome/common/physical_web/physical_web_scanner.h"
6 6
7 #import <CoreBluetooth/CoreBluetooth.h> 7 #import <CoreBluetooth/CoreBluetooth.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 - (instancetype)initWithDelegate:(id<PhysicalWebScannerDelegate>)delegate { 102 - (instancetype)initWithDelegate:(id<PhysicalWebScannerDelegate>)delegate {
103 self = [super init]; 103 self = [super init];
104 if (self) { 104 if (self) {
105 delegate_ = delegate; 105 delegate_ = delegate;
106 devices_.reset([[NSMutableArray alloc] init]); 106 devices_.reset([[NSMutableArray alloc] init]);
107 devicesUrls_.reset([[NSMutableSet alloc] init]); 107 devicesUrls_.reset([[NSMutableSet alloc] init]);
108 finalUrls_.reset([[NSMutableSet alloc] init]); 108 finalUrls_.reset([[NSMutableSet alloc] init]);
109 pendingRequests_.reset([[NSMutableArray alloc] init]); 109 pendingRequests_.reset([[NSMutableArray alloc] init]);
110 centralManager_.reset([[CBCentralManager alloc] 110 centralManager_.reset([[CBCentralManager alloc]
111 initWithDelegate:self 111 initWithDelegate:self
112 queue:dispatch_get_main_queue()]); 112 queue:dispatch_get_main_queue()
113 options:@{
114 CBCentralManagerOptionShowPowerAlertKey : @NO
115 }]);
113 unresolvedDevices_.reset([[NSMutableArray alloc] init]); 116 unresolvedDevices_.reset([[NSMutableArray alloc] init]);
114 [[NSHTTPCookieStorage sharedHTTPCookieStorage] 117 [[NSHTTPCookieStorage sharedHTTPCookieStorage]
115 setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever]; 118 setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever];
116 } 119 }
117 return self; 120 return self;
118 } 121 }
119 122
120 - (instancetype)init { 123 - (instancetype)init {
121 NOTREACHED(); 124 NOTREACHED();
122 return nil; 125 return nil;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 [strongSelf.get()->devices_ addObject:device]; 483 [strongSelf.get()->devices_ addObject:device];
481 [strongSelf.get()->delegate_ scannerUpdatedDevices:weakSelf]; 484 [strongSelf.get()->delegate_ scannerUpdatedDevices:weakSelf];
482 [strongSelf.get()->finalUrls_ addObject:[device url]]; 485 [strongSelf.get()->finalUrls_ addObject:[device url]];
483 } 486 }
484 } 487 }
485 [strongSelf.get()->pendingRequests_ removeObject:strongRequest]; 488 [strongSelf.get()->pendingRequests_ removeObject:strongRequest];
486 }]; 489 }];
487 } 490 }
488 491
489 @end 492 @end
OLDNEW
« 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