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