| OLD | NEW |
| 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_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 #include "media/media_features.h" | 189 #include "media/media_features.h" |
| 190 #include "net/base/mime_util.h" | 190 #include "net/base/mime_util.h" |
| 191 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 191 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 192 #include "net/cookies/canonical_cookie.h" | 192 #include "net/cookies/canonical_cookie.h" |
| 193 #include "net/cookies/cookie_options.h" | 193 #include "net/cookies/cookie_options.h" |
| 194 #include "net/ssl/ssl_cert_request_info.h" | 194 #include "net/ssl/ssl_cert_request_info.h" |
| 195 #include "ppapi/features/features.h" | 195 #include "ppapi/features/features.h" |
| 196 #include "ppapi/host/ppapi_host.h" | 196 #include "ppapi/host/ppapi_host.h" |
| 197 #include "printing/features/features.h" | 197 #include "printing/features/features.h" |
| 198 #include "services/image_decoder/public/interfaces/constants.mojom.h" | 198 #include "services/image_decoder/public/interfaces/constants.mojom.h" |
| 199 #include "services/preferences/public/cpp/pref_store_manager_impl.h" |
| 199 #include "services/preferences/public/interfaces/preferences.mojom.h" | 200 #include "services/preferences/public/interfaces/preferences.mojom.h" |
| 200 #include "services/service_manager/public/cpp/interface_provider.h" | 201 #include "services/service_manager/public/cpp/interface_provider.h" |
| 201 #include "services/service_manager/public/cpp/interface_registry.h" | 202 #include "services/service_manager/public/cpp/interface_registry.h" |
| 202 #include "services/service_manager/public/cpp/service.h" | 203 #include "services/service_manager/public/cpp/service.h" |
| 203 #include "storage/browser/fileapi/external_mount_points.h" | 204 #include "storage/browser/fileapi/external_mount_points.h" |
| 204 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" | 205 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" |
| 205 #include "ui/base/l10n/l10n_util.h" | 206 #include "ui/base/l10n/l10n_util.h" |
| 206 #include "ui/base/resource/resource_bundle.h" | 207 #include "ui/base/resource/resource_bundle.h" |
| 207 #include "ui/resources/grit/ui_resources.h" | 208 #include "ui/resources/grit/ui_resources.h" |
| 208 #include "url/gurl.h" | 209 #include "url/gurl.h" |
| (...skipping 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3229 | 3230 |
| 3230 if (!ash_util::IsRunningInMash()) { | 3231 if (!ash_util::IsRunningInMash()) { |
| 3231 content::ServiceInfo info; | 3232 content::ServiceInfo info; |
| 3232 info.factory = base::Bind(&ash_util::CreateEmbeddedAshService, | 3233 info.factory = base::Bind(&ash_util::CreateEmbeddedAshService, |
| 3233 base::ThreadTaskRunnerHandle::Get()); | 3234 base::ThreadTaskRunnerHandle::Get()); |
| 3234 services->insert(std::make_pair(ash::mojom::kServiceName, info)); | 3235 services->insert(std::make_pair(ash::mojom::kServiceName, info)); |
| 3235 } | 3236 } |
| 3236 #endif // OS_CHROMEOS | 3237 #endif // OS_CHROMEOS |
| 3237 } | 3238 } |
| 3238 | 3239 |
| 3240 void ChromeContentBrowserClient::RegisterInProcessServices( |
| 3241 content::BrowserContext* browser_context, |
| 3242 StaticServiceMap* services) { |
| 3243 if (base::FeatureList::IsEnabled(features::kPrefService)) { |
| 3244 content::ServiceInfo info; |
| 3245 info.factory = base::Bind([] { |
| 3246 return std::unique_ptr<service_manager::Service>( |
| 3247 base::MakeUnique<prefs::PrefStoreManagerImpl>( |
| 3248 prefs::PrefStoreManagerImpl::PrefStoreTypes())); |
| 3249 }); |
| 3250 services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info)); |
| 3251 } |
| 3252 } |
| 3253 |
| 3239 void ChromeContentBrowserClient::RegisterOutOfProcessServices( | 3254 void ChromeContentBrowserClient::RegisterOutOfProcessServices( |
| 3240 OutOfProcessServiceMap* services) { | 3255 OutOfProcessServiceMap* services) { |
| 3241 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 3256 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) |
| 3242 services->insert(std::make_pair("media", | 3257 services->insert(std::make_pair("media", |
| 3243 base::ASCIIToUTF16("Media Service"))); | 3258 base::ASCIIToUTF16("Media Service"))); |
| 3244 #endif | 3259 #endif |
| 3245 services->insert(std::make_pair(image_decoder::mojom::kServiceName, | 3260 services->insert(std::make_pair(image_decoder::mojom::kServiceName, |
| 3246 base::ASCIIToUTF16("Image Decoder Service"))); | 3261 base::ASCIIToUTF16("Image Decoder Service"))); |
| 3247 } | 3262 } |
| 3248 | 3263 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3551 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3566 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3552 return variations::GetVariationParamValue( | 3567 return variations::GetVariationParamValue( |
| 3553 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3568 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3554 } | 3569 } |
| 3555 | 3570 |
| 3556 // static | 3571 // static |
| 3557 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3572 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3558 const storage::QuotaSettings* settings) { | 3573 const storage::QuotaSettings* settings) { |
| 3559 g_default_quota_settings = settings; | 3574 g_default_quota_settings = settings; |
| 3560 } | 3575 } |
| OLD | NEW |