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

Side by Side Diff: ios/chrome/browser/ios_chrome_main_parts.mm

Issue 2512193002: [ObjC ARC] Converts ios/chrome/browser:browser_impl to ARC.Automatically generated ARCMigrate com… (Closed)
Patch Set: fixed compile guard Created 4 years, 1 month 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 | « ios/chrome/browser/BUILD.gn ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ios/chrome/browser/ios_chrome_main_parts.h" 5 #include "ios/chrome/browser/ios_chrome_main_parts.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "net/http/http_stream_factory.h" 52 #include "net/http/http_stream_factory.h"
53 #include "net/url_request/url_request.h" 53 #include "net/url_request/url_request.h"
54 #include "ui/base/l10n/l10n_util_mac.h" 54 #include "ui/base/l10n/l10n_util_mac.h"
55 #include "ui/base/resource/resource_bundle.h" 55 #include "ui/base/resource/resource_bundle.h"
56 56
57 #if defined(ENABLE_RLZ) 57 #if defined(ENABLE_RLZ)
58 #include "components/rlz/rlz_tracker.h" // nogncheck 58 #include "components/rlz/rlz_tracker.h" // nogncheck
59 #include "ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h" // nogncheck 59 #include "ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h" // nogncheck
60 #endif 60 #endif
61 61
62 #if !defined(__has_feature) || !__has_feature(objc_arc)
63 #error "This file requires ARC support."
64 #endif
65
62 IOSChromeMainParts::IOSChromeMainParts( 66 IOSChromeMainParts::IOSChromeMainParts(
63 const base::CommandLine& parsed_command_line) 67 const base::CommandLine& parsed_command_line)
64 : parsed_command_line_(parsed_command_line), local_state_(nullptr) { 68 : parsed_command_line_(parsed_command_line), local_state_(nullptr) {
65 // Chrome disallows cookies by default. All code paths that want to use 69 // Chrome disallows cookies by default. All code paths that want to use
66 // cookies need to go through one of Chrome's URLRequestContexts which have 70 // cookies need to go through one of Chrome's URLRequestContexts which have
67 // a ChromeNetworkDelegate attached that selectively allows cookies again. 71 // a ChromeNetworkDelegate attached that selectively allows cookies again.
68 net::URLRequest::SetDefaultCookiePolicyToBlock(); 72 net::URLRequest::SetDefaultCookiePolicyToBlock();
69 } 73 }
70 74
71 IOSChromeMainParts::~IOSChromeMainParts() {} 75 IOSChromeMainParts::~IOSChromeMainParts() {}
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 299
296 void IOSChromeMainParts::StartMetricsRecording() { 300 void IOSChromeMainParts::StartMetricsRecording() {
297 bool wifiOnly = local_state_->GetBoolean(prefs::kMetricsReportingWifiOnly); 301 bool wifiOnly = local_state_->GetBoolean(prefs::kMetricsReportingWifiOnly);
298 bool isConnectionCellular = net::NetworkChangeNotifier::IsConnectionCellular( 302 bool isConnectionCellular = net::NetworkChangeNotifier::IsConnectionCellular(
299 net::NetworkChangeNotifier::GetConnectionType()); 303 net::NetworkChangeNotifier::GetConnectionType());
300 bool mayUpload = !wifiOnly || !isConnectionCellular; 304 bool mayUpload = !wifiOnly || !isConnectionCellular;
301 305
302 application_context_->GetMetricsServicesManager()->UpdateUploadPermissions( 306 application_context_->GetMetricsServicesManager()->UpdateUploadPermissions(
303 mayUpload); 307 mayUpload);
304 } 308 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698