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

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

Issue 2144533002: Convert network hints to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sammc's review comments Created 4 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/command_line.h" 10 #include "base/command_line.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 startup_metric_host->RecordRendererMainEntryTime(main_entry_time_); 335 startup_metric_host->RecordRendererMainEntryTime(main_entry_time_);
336 } 336 }
337 337
338 chrome_observer_.reset(new ChromeRenderThreadObserver()); 338 chrome_observer_.reset(new ChromeRenderThreadObserver());
339 web_cache_impl_.reset(new web_cache::WebCacheImpl()); 339 web_cache_impl_.reset(new web_cache::WebCacheImpl());
340 340
341 #if defined(ENABLE_EXTENSIONS) 341 #if defined(ENABLE_EXTENSIONS)
342 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted(); 342 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted();
343 #endif 343 #endif
344 344
345 prescient_networking_dispatcher_.reset(
346 new network_hints::PrescientNetworkingDispatcher());
347 #if defined(ENABLE_SPELLCHECK) 345 #if defined(ENABLE_SPELLCHECK)
348 // ChromeRenderViewTest::SetUp() creates a Spellcheck and injects it using 346 // ChromeRenderViewTest::SetUp() creates a Spellcheck and injects it using
349 // SetSpellcheck(). Don't overwrite it. 347 // SetSpellcheck(). Don't overwrite it.
350 if (!spellcheck_) { 348 if (!spellcheck_) {
351 spellcheck_.reset(new SpellCheck()); 349 spellcheck_.reset(new SpellCheck());
352 thread->AddObserver(spellcheck_.get()); 350 thread->AddObserver(spellcheck_.get());
353 } 351 }
354 #endif 352 #endif
355 visited_link_slave_.reset(new visitedlink::VisitedLinkSlave()); 353 visited_link_slave_.reset(new visitedlink::VisitedLinkSlave());
356 #if defined(FULL_SAFE_BROWSING) 354 #if defined(FULL_SAFE_BROWSING)
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 const char* canonical_url, size_t length) { 1128 const char* canonical_url, size_t length) {
1131 return visited_link_slave_->ComputeURLFingerprint(canonical_url, length); 1129 return visited_link_slave_->ComputeURLFingerprint(canonical_url, length);
1132 } 1130 }
1133 1131
1134 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { 1132 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) {
1135 return visited_link_slave_->IsVisited(link_hash); 1133 return visited_link_slave_->IsVisited(link_hash);
1136 } 1134 }
1137 1135
1138 blink::WebPrescientNetworking* 1136 blink::WebPrescientNetworking*
1139 ChromeContentRendererClient::GetPrescientNetworking() { 1137 ChromeContentRendererClient::GetPrescientNetworking() {
1140 return prescient_networking_dispatcher_.get(); 1138 return chrome_observer_->prescient_networking_dispatcher();
1141 } 1139 }
1142 1140
1143 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( 1141 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState(
1144 const content::RenderFrame* render_frame, 1142 const content::RenderFrame* render_frame,
1145 blink::WebPageVisibilityState* override_state) { 1143 blink::WebPageVisibilityState* override_state) {
1146 if (!prerender::PrerenderHelper::IsPrerendering(render_frame)) 1144 if (!prerender::PrerenderHelper::IsPrerendering(render_frame))
1147 return false; 1145 return false;
1148 1146
1149 *override_state = blink::WebPageVisibilityStatePrerender; 1147 *override_state = blink::WebPageVisibilityStatePrerender;
1150 return true; 1148 return true;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 // chrome.system.network.getNetworkInterfaces provides the same 1376 // chrome.system.network.getNetworkInterfaces provides the same
1379 // information. Also, the enforcement of sending and binding UDP is already done 1377 // information. Also, the enforcement of sending and binding UDP is already done
1380 // by chrome extension permission model. 1378 // by chrome extension permission model.
1381 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1379 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1382 #if defined(ENABLE_EXTENSIONS) 1380 #if defined(ENABLE_EXTENSIONS)
1383 return !IsStandaloneExtensionProcess(); 1381 return !IsStandaloneExtensionProcess();
1384 #else 1382 #else
1385 return true; 1383 return true;
1386 #endif 1384 #endif
1387 } 1385 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698