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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 | 1073 |
1074 unsigned long long ChromeContentRendererClient::VisitedLinkHash( | 1074 unsigned long long ChromeContentRendererClient::VisitedLinkHash( |
1075 const char* canonical_url, size_t length) { | 1075 const char* canonical_url, size_t length) { |
1076 return visited_link_slave_->ComputeURLFingerprint(canonical_url, length); | 1076 return visited_link_slave_->ComputeURLFingerprint(canonical_url, length); |
1077 } | 1077 } |
1078 | 1078 |
1079 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | 1079 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
1080 return visited_link_slave_->IsVisited(link_hash); | 1080 return visited_link_slave_->IsVisited(link_hash); |
1081 } | 1081 } |
1082 | 1082 |
1083 void ChromeContentRendererClient::PrefetchHostName(const char* hostname, | |
1084 size_t length) { | |
1085 net_predictor_->Resolve(hostname, length); | |
1086 } | |
1087 | |
1088 WebKit::WebPrescientNetworking* | 1083 WebKit::WebPrescientNetworking* |
1089 ChromeContentRendererClient::GetPrescientNetworking() { | 1084 ChromeContentRendererClient::GetPrescientNetworking() { |
1090 return prescient_networking_dispatcher_.get(); | 1085 return prescient_networking_dispatcher_.get(); |
1091 } | 1086 } |
1092 | 1087 |
1093 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( | 1088 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( |
1094 const content::RenderView* render_view, | 1089 const content::RenderView* render_view, |
1095 WebKit::WebPageVisibilityState* override_state) const { | 1090 WebKit::WebPageVisibilityState* override_state) const { |
1096 if (!prerender::PrerenderHelper::IsPrerendering(render_view)) | 1091 if (!prerender::PrerenderHelper::IsPrerendering(render_view)) |
1097 return false; | 1092 return false; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1292 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1298 switches::kEnablePepperTesting)) { | 1293 switches::kEnablePepperTesting)) { |
1299 return true; | 1294 return true; |
1300 } | 1295 } |
1301 #endif // !defined(OS_ANDROID) | 1296 #endif // !defined(OS_ANDROID) |
1302 return false; | 1297 return false; |
1303 } | 1298 } |
1304 | 1299 |
1305 | 1300 |
1306 } // namespace chrome | 1301 } // namespace chrome |
OLD | NEW |