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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2960703003: Add a feature flag for network service and about:flags entry for it. (Closed)
Patch Set: more updates 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "components/signin/core/common/profile_management_switches.h" 82 #include "components/signin/core/common/profile_management_switches.h"
83 #include "components/spellcheck/spellcheck_build_features.h" 83 #include "components/spellcheck/spellcheck_build_features.h"
84 #include "components/startup_metric_utils/common/startup_metric.mojom.h" 84 #include "components/startup_metric_utils/common/startup_metric.mojom.h"
85 #include "components/subresource_filter/content/renderer/subresource_filter_agen t.h" 85 #include "components/subresource_filter/content/renderer/subresource_filter_agen t.h"
86 #include "components/subresource_filter/content/renderer/unverified_ruleset_deal er.h" 86 #include "components/subresource_filter/content/renderer/unverified_ruleset_deal er.h"
87 #include "components/task_scheduler_util/renderer/initialization.h" 87 #include "components/task_scheduler_util/renderer/initialization.h"
88 #include "components/version_info/version_info.h" 88 #include "components/version_info/version_info.h"
89 #include "components/visitedlink/renderer/visitedlink_slave.h" 89 #include "components/visitedlink/renderer/visitedlink_slave.h"
90 #include "components/web_cache/renderer/web_cache_impl.h" 90 #include "components/web_cache/renderer/web_cache_impl.h"
91 #include "content/public/common/content_constants.h" 91 #include "content/public/common/content_constants.h"
92 #include "content/public/common/content_features.h"
92 #include "content/public/common/content_switches.h" 93 #include "content/public/common/content_switches.h"
93 #include "content/public/common/service_names.mojom.h" 94 #include "content/public/common/service_names.mojom.h"
94 #include "content/public/common/url_constants.h" 95 #include "content/public/common/url_constants.h"
95 #include "content/public/renderer/plugin_instance_throttler.h" 96 #include "content/public/renderer/plugin_instance_throttler.h"
96 #include "content/public/renderer/render_frame.h" 97 #include "content/public/renderer/render_frame.h"
97 #include "content/public/renderer/render_frame_visitor.h" 98 #include "content/public/renderer/render_frame_visitor.h"
98 #include "content/public/renderer/render_thread.h" 99 #include "content/public/renderer/render_thread.h"
99 #include "content/public/renderer/render_view.h" 100 #include "content/public/renderer/render_view.h"
100 #include "extensions/common/constants.h" 101 #include "extensions/common/constants.h"
101 #include "extensions/features/features.h" 102 #include "extensions/features/features.h"
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 1602
1602 std::unique_ptr<base::TaskScheduler::InitParams> 1603 std::unique_ptr<base::TaskScheduler::InitParams>
1603 ChromeContentRendererClient::GetTaskSchedulerInitParams() { 1604 ChromeContentRendererClient::GetTaskSchedulerInitParams() {
1604 return task_scheduler_util:: 1605 return task_scheduler_util::
1605 GetRendererTaskSchedulerInitParamsFromCommandLine(); 1606 GetRendererTaskSchedulerInitParamsFromCommandLine();
1606 } 1607 }
1607 1608
1608 bool ChromeContentRendererClient::UsingSafeBrowsingMojoService() { 1609 bool ChromeContentRendererClient::UsingSafeBrowsingMojoService() {
1609 if (safe_browsing_) 1610 if (safe_browsing_)
1610 return true; 1611 return true;
1611 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 1612 if (!base::FeatureList::IsEnabled(features::kNetworkService)) {
Alexei Svitkine (slow) 2017/06/29 13:58:24 Nit: No {}'s
jam 2017/06/30 17:21:18 Done.
1612 switches::kEnableNetworkService)) {
1613 return false; 1613 return false;
1614 } 1614 }
1615 RenderThread::Get()->GetConnector()->BindInterface( 1615 RenderThread::Get()->GetConnector()->BindInterface(
1616 content::mojom::kBrowserServiceName, &safe_browsing_); 1616 content::mojom::kBrowserServiceName, &safe_browsing_);
1617 return true; 1617 return true;
1618 } 1618 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698