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

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

Issue 2801813003: Omnibox - ClipboardRecentContent - Make Proper Singleton (Closed)
Patch Set: fix iOS Created 3 years, 8 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 | « components/open_from_clipboard/clipboard_recent_content.cc ('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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 StartMetricsRecording(); 144 StartMetricsRecording();
145 145
146 application_context_->PreMainMessageLoopRun(); 146 application_context_->PreMainMessageLoopRun();
147 147
148 // ContentSettingsPattern need to be initialized before creating the 148 // ContentSettingsPattern need to be initialized before creating the
149 // ChromeBrowserState. 149 // ChromeBrowserState.
150 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme( 150 ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
151 kDummyExtensionScheme); 151 kDummyExtensionScheme);
152 152
153 // Ensure ClipboadRecentContentIOS is created. 153 // Ensure ClipboadRecentContentIOS is created.
154 ClipboardRecentContent::SetInstance( 154 ClipboardRecentContent::SetInstance(CreateClipboardRecentContentIOS());
155 CreateClipboardRecentContentIOS().release());
156 155
157 // Ensure that the browser state is initialized. 156 // Ensure that the browser state is initialized.
158 EnsureBrowserStateKeyedServiceFactoriesBuilt(); 157 EnsureBrowserStateKeyedServiceFactoriesBuilt();
159 ios::ChromeBrowserStateManager* browser_state_manager = 158 ios::ChromeBrowserStateManager* browser_state_manager =
160 application_context_->GetChromeBrowserStateManager(); 159 application_context_->GetChromeBrowserStateManager();
161 ios::ChromeBrowserState* last_used_browser_state = 160 ios::ChromeBrowserState* last_used_browser_state =
162 browser_state_manager->GetLastUsedBrowserState(); 161 browser_state_manager->GetLastUsedBrowserState();
163 162
164 #if BUILDFLAG(ENABLE_RLZ) 163 #if BUILDFLAG(ENABLE_RLZ)
165 // Init the RLZ library. This just schedules a task on the file thread to be 164 // Init the RLZ library. This just schedules a task on the file thread to be
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 282
284 void IOSChromeMainParts::StartMetricsRecording() { 283 void IOSChromeMainParts::StartMetricsRecording() {
285 bool wifiOnly = local_state_->GetBoolean(prefs::kMetricsReportingWifiOnly); 284 bool wifiOnly = local_state_->GetBoolean(prefs::kMetricsReportingWifiOnly);
286 bool isConnectionCellular = net::NetworkChangeNotifier::IsConnectionCellular( 285 bool isConnectionCellular = net::NetworkChangeNotifier::IsConnectionCellular(
287 net::NetworkChangeNotifier::GetConnectionType()); 286 net::NetworkChangeNotifier::GetConnectionType());
288 bool mayUpload = !wifiOnly || !isConnectionCellular; 287 bool mayUpload = !wifiOnly || !isConnectionCellular;
289 288
290 application_context_->GetMetricsServicesManager()->UpdateUploadPermissions( 289 application_context_->GetMetricsServicesManager()->UpdateUploadPermissions(
291 mayUpload); 290 mayUpload);
292 } 291 }
OLDNEW
« no previous file with comments | « components/open_from_clipboard/clipboard_recent_content.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698