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 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3219 | 3220 |
3220 if (!chrome::IsRunningInMash()) { | 3221 if (!chrome::IsRunningInMash()) { |
3221 content::ServiceInfo info; | 3222 content::ServiceInfo info; |
3222 info.factory = base::Bind(&ash_util::CreateEmbeddedAshService, | 3223 info.factory = base::Bind(&ash_util::CreateEmbeddedAshService, |
3223 base::ThreadTaskRunnerHandle::Get()); | 3224 base::ThreadTaskRunnerHandle::Get()); |
3224 services->insert(std::make_pair("ash", info)); | 3225 services->insert(std::make_pair("ash", info)); |
3225 } | 3226 } |
3226 #endif // OS_CHROMEOS | 3227 #endif // OS_CHROMEOS |
3227 } | 3228 } |
3228 | 3229 |
| 3230 void ChromeContentBrowserClient::RegisterInProcessServices( |
| 3231 content::BrowserContext* browser_context, |
| 3232 StaticServiceMap* services) { |
| 3233 { |
| 3234 content::ServiceInfo info; |
| 3235 info.factory = base::Bind([] { |
| 3236 return std::unique_ptr<service_manager::Service>( |
| 3237 base::MakeUnique<prefs::PrefStoreManagerImpl>( |
| 3238 prefs::PrefStoreManagerImpl::DefaultStores())); |
| 3239 }); |
| 3240 services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info)); |
| 3241 } |
| 3242 } |
| 3243 |
3229 void ChromeContentBrowserClient::RegisterOutOfProcessServices( | 3244 void ChromeContentBrowserClient::RegisterOutOfProcessServices( |
3230 OutOfProcessServiceMap* services) { | 3245 OutOfProcessServiceMap* services) { |
3231 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 3246 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) |
3232 services->insert(std::make_pair("media", | 3247 services->insert(std::make_pair("media", |
3233 base::ASCIIToUTF16("Media Service"))); | 3248 base::ASCIIToUTF16("Media Service"))); |
3234 #endif | 3249 #endif |
3235 services->insert(std::make_pair(image_decoder::mojom::kServiceName, | 3250 services->insert(std::make_pair(image_decoder::mojom::kServiceName, |
3236 base::ASCIIToUTF16("Image Decoder Service"))); | 3251 base::ASCIIToUTF16("Image Decoder Service"))); |
3237 } | 3252 } |
3238 | 3253 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3541 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3556 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3542 return variations::GetVariationParamValue( | 3557 return variations::GetVariationParamValue( |
3543 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3558 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3544 } | 3559 } |
3545 | 3560 |
3546 // static | 3561 // static |
3547 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3562 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3548 const storage::QuotaSettings* settings) { | 3563 const storage::QuotaSettings* settings) { |
3549 g_default_quota_settings = settings; | 3564 g_default_quota_settings = settings; |
3550 } | 3565 } |
OLD | NEW |