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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 4 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 | « chrome/browser/DEPS ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 #include "components/startup_metric_utils/browser/startup_metric_utils.h" 134 #include "components/startup_metric_utils/browser/startup_metric_utils.h"
135 #include "components/tracing/common/tracing_switches.h" 135 #include "components/tracing/common/tracing_switches.h"
136 #include "components/translate/core/browser/translate_download_manager.h" 136 #include "components/translate/core/browser/translate_download_manager.h"
137 #include "components/variations/pref_names.h" 137 #include "components/variations/pref_names.h"
138 #include "components/variations/service/variations_service.h" 138 #include "components/variations/service/variations_service.h"
139 #include "components/variations/variations_associated_data.h" 139 #include "components/variations/variations_associated_data.h"
140 #include "components/variations/variations_http_header_provider.h" 140 #include "components/variations/variations_http_header_provider.h"
141 #include "components/variations/variations_switches.h" 141 #include "components/variations/variations_switches.h"
142 #include "components/version_info/version_info.h" 142 #include "components/version_info/version_info.h"
143 #include "content/public/browser/browser_thread.h" 143 #include "content/public/browser/browser_thread.h"
144 #include "content/public/browser/geolocation_delegate.h"
145 #include "content/public/browser/geolocation_provider.h"
144 #include "content/public/browser/notification_observer.h" 146 #include "content/public/browser/notification_observer.h"
145 #include "content/public/browser/notification_registrar.h" 147 #include "content/public/browser/notification_registrar.h"
146 #include "content/public/browser/notification_service.h" 148 #include "content/public/browser/notification_service.h"
147 #include "content/public/browser/notification_types.h" 149 #include "content/public/browser/notification_types.h"
148 #include "content/public/browser/power_usage_monitor.h" 150 #include "content/public/browser/power_usage_monitor.h"
149 #include "content/public/browser/site_instance.h" 151 #include "content/public/browser/site_instance.h"
150 #include "content/public/common/content_client.h" 152 #include "content/public/common/content_client.h"
151 #include "content/public/common/content_features.h" 153 #include "content/public/common/content_features.h"
152 #include "content/public/common/content_switches.h" 154 #include "content/public/common/content_switches.h"
153 #include "content/public/common/main_function_params.h" 155 #include "content/public/common/main_function_params.h"
154 #include "device/geolocation/geolocation_delegate.h"
155 #include "device/geolocation/geolocation_provider.h"
156 #include "grit/platform_locale_settings.h" 156 #include "grit/platform_locale_settings.h"
157 #include "media/base/media_resources.h" 157 #include "media/base/media_resources.h"
158 #include "net/base/net_module.h" 158 #include "net/base/net_module.h"
159 #include "net/cookies/cookie_monster.h" 159 #include "net/cookies/cookie_monster.h"
160 #include "net/http/http_network_layer.h" 160 #include "net/http/http_network_layer.h"
161 #include "net/http/http_stream_factory.h" 161 #include "net/http/http_stream_factory.h"
162 #include "net/url_request/url_request.h" 162 #include "net/url_request/url_request.h"
163 #include "ui/base/l10n/l10n_util.h" 163 #include "ui/base/l10n/l10n_util.h"
164 #include "ui/base/layout.h" 164 #include "ui/base/layout.h"
165 #include "ui/base/material_design/material_design_controller.h" 165 #include "ui/base/material_design/material_design_controller.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 #include "chrome/browser/lifetime/application_lifetime.h" 271 #include "chrome/browser/lifetime/application_lifetime.h"
272 #include "content/public/common/mojo_shell_connection.h" 272 #include "content/public/common/mojo_shell_connection.h"
273 #include "services/shell/runner/common/client_util.h" 273 #include "services/shell/runner/common/client_util.h"
274 #endif 274 #endif
275 275
276 using content::BrowserThread; 276 using content::BrowserThread;
277 277
278 namespace { 278 namespace {
279 279
280 // A provider of Geolocation services to override AccessTokenStore. 280 // A provider of Geolocation services to override AccessTokenStore.
281 class ChromeGeolocationDelegate : public device::GeolocationDelegate { 281 class ChromeGeolocationDelegate : public content::GeolocationDelegate {
282 public: 282 public:
283 ChromeGeolocationDelegate() = default; 283 ChromeGeolocationDelegate() = default;
284 284
285 scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final { 285 scoped_refptr<content::AccessTokenStore> CreateAccessTokenStore() final {
286 return new ChromeAccessTokenStore(); 286 return new ChromeAccessTokenStore();
287 } 287 }
288 288
289 private: 289 private:
290 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationDelegate); 290 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationDelegate);
291 }; 291 };
292 292
293 // This function provides some ways to test crash and assertion handling 293 // This function provides some ways to test crash and assertion handling
294 // behavior of the program. 294 // behavior of the program.
295 void HandleTestParameters(const base::CommandLine& command_line) { 295 void HandleTestParameters(const base::CommandLine& command_line) {
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 SetupOriginTrialsCommandLine(); 1214 SetupOriginTrialsCommandLine();
1215 1215
1216 // Now the command line has been mutated based on about:flags, we can setup 1216 // Now the command line has been mutated based on about:flags, we can setup
1217 // metrics and initialize field trials. The field trials are needed by 1217 // metrics and initialize field trials. The field trials are needed by
1218 // IOThread's initialization which happens in BrowserProcess:PreCreateThreads. 1218 // IOThread's initialization which happens in BrowserProcess:PreCreateThreads.
1219 SetupMetricsAndFieldTrials(); 1219 SetupMetricsAndFieldTrials();
1220 1220
1221 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this. 1221 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this.
1222 browser_process_->PreCreateThreads(); 1222 browser_process_->PreCreateThreads();
1223 1223
1224 device::GeolocationProvider::SetGeolocationDelegate( 1224 content::GeolocationProvider::SetGeolocationDelegate(
1225 new ChromeGeolocationDelegate()); 1225 new ChromeGeolocationDelegate());
1226 1226
1227 return content::RESULT_CODE_NORMAL_EXIT; 1227 return content::RESULT_CODE_NORMAL_EXIT;
1228 } 1228 }
1229 1229
1230 void ChromeBrowserMainParts::PreMainMessageLoopRun() { 1230 void ChromeBrowserMainParts::PreMainMessageLoopRun() {
1231 #if defined(MOJO_SHELL_CLIENT) 1231 #if defined(MOJO_SHELL_CLIENT)
1232 if (content::MojoShellConnection::GetForProcess() && shell::ShellIsRemote()) { 1232 if (content::MojoShellConnection::GetForProcess() && shell::ShellIsRemote()) {
1233 content::MojoShellConnection::GetForProcess()->SetConnectionLostClosure( 1233 content::MojoShellConnection::GetForProcess()->SetConnectionLostClosure(
1234 base::Bind(&chrome::SessionEnding)); 1234 base::Bind(&chrome::SessionEnding));
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 chromeos::CrosSettings::Shutdown(); 2072 chromeos::CrosSettings::Shutdown();
2073 #endif // defined(OS_CHROMEOS) 2073 #endif // defined(OS_CHROMEOS)
2074 #endif // defined(OS_ANDROID) 2074 #endif // defined(OS_ANDROID)
2075 } 2075 }
2076 2076
2077 // Public members: 2077 // Public members:
2078 2078
2079 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2079 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2080 chrome_extra_parts_.push_back(parts); 2080 chrome_extra_parts_.push_back(parts);
2081 } 2081 }
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698