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

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 2960703003: Add a feature flag for network service and about:flags entry for it. (Closed)
Patch Set: merge Created 3 years, 5 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
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 "content/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 #include "content/browser/notifications/platform_notification_context_impl.h" 24 #include "content/browser/notifications/platform_notification_context_impl.h"
25 #include "content/common/dom_storage/dom_storage_types.h" 25 #include "content/common/dom_storage/dom_storage_types.h"
26 #include "content/public/browser/browser_context.h" 26 #include "content/public/browser/browser_context.h"
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/content_browser_client.h" 28 #include "content/public/browser/content_browser_client.h"
29 #include "content/public/browser/dom_storage_context.h" 29 #include "content/public/browser/dom_storage_context.h"
30 #include "content/public/browser/indexed_db_context.h" 30 #include "content/public/browser/indexed_db_context.h"
31 #include "content/public/browser/local_storage_usage_info.h" 31 #include "content/public/browser/local_storage_usage_info.h"
32 #include "content/public/browser/session_storage_usage_info.h" 32 #include "content/public/browser/session_storage_usage_info.h"
33 #include "content/public/common/content_client.h" 33 #include "content/public/common/content_client.h"
34 #include "content/public/common/content_features.h"
34 #include "content/public/common/content_switches.h" 35 #include "content/public/common/content_switches.h"
35 #include "content/public/common/service_manager_connection.h" 36 #include "content/public/common/service_manager_connection.h"
36 #include "content/public/common/service_names.mojom.h" 37 #include "content/public/common/service_names.mojom.h"
37 #include "net/base/completion_callback.h" 38 #include "net/base/completion_callback.h"
38 #include "net/base/net_errors.h" 39 #include "net/base/net_errors.h"
39 #include "net/cookies/canonical_cookie.h" 40 #include "net/cookies/canonical_cookie.h"
40 #include "net/cookies/cookie_monster.h" 41 #include "net/cookies/cookie_monster.h"
41 #include "net/url_request/url_request_context.h" 42 #include "net/url_request/url_request_context.h"
42 #include "net/url_request/url_request_context_getter.h" 43 #include "net/url_request/url_request_context_getter.h"
43 #include "ppapi/features/features.h" 44 #include "ppapi/features/features.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 partition->background_sync_context_ = new BackgroundSyncContext(); 523 partition->background_sync_context_ = new BackgroundSyncContext();
523 partition->background_sync_context_->Init(partition->service_worker_context_); 524 partition->background_sync_context_->Init(partition->service_worker_context_);
524 525
525 partition->payment_app_context_ = new PaymentAppContextImpl(); 526 partition->payment_app_context_ = new PaymentAppContextImpl();
526 partition->payment_app_context_->Init(partition->service_worker_context_); 527 partition->payment_app_context_->Init(partition->service_worker_context_);
527 528
528 partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); 529 partition->broadcast_channel_provider_ = new BroadcastChannelProvider();
529 530
530 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); 531 partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap();
531 532
532 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 533 if (base::FeatureList::IsEnabled(features::kNetworkService)) {
533 switches::kEnableNetworkService)) {
534 static mojom::NetworkServicePtr* g_network_service = 534 static mojom::NetworkServicePtr* g_network_service =
535 new mojom::NetworkServicePtr; 535 new mojom::NetworkServicePtr;
536 if (!g_network_service->is_bound()) { 536 if (!g_network_service->is_bound()) {
537 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( 537 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface(
538 mojom::kNetworkServiceName, g_network_service); 538 mojom::kNetworkServiceName, g_network_service);
539 } 539 }
540 mojom::NetworkContextParamsPtr context_params = 540 mojom::NetworkContextParamsPtr context_params =
541 mojom::NetworkContextParams::New(); 541 mojom::NetworkContextParams::New();
542 // TODO: fill this 542 // TODO: fill this
543 // context_params->cache_dir = 543 // context_params->cache_dir =
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 media_url_request_context_ = media_url_request_context; 990 media_url_request_context_ = media_url_request_context;
991 } 991 }
992 992
993 void StoragePartitionImpl::GetQuotaSettings( 993 void StoragePartitionImpl::GetQuotaSettings(
994 storage::OptionalQuotaSettingsCallback callback) { 994 storage::OptionalQuotaSettingsCallback callback) {
995 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, 995 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this,
996 std::move(callback)); 996 std::move(callback));
997 } 997 }
998 998
999 } // namespace content 999 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698