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

Unified Diff: chromecast/renderer/prescient_networking_dispatcher.cc

Issue 785693002: Adds DNS prefetch support to Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetch-browser
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/renderer/prescient_networking_dispatcher.cc
diff --git a/chrome/renderer/net/prescient_networking_dispatcher.cc b/chromecast/renderer/prescient_networking_dispatcher.cc
similarity index 56%
copy from chrome/renderer/net/prescient_networking_dispatcher.cc
copy to chromecast/renderer/prescient_networking_dispatcher.cc
index be42b3ec0ee3c8d5e6d693abf096aa9689f0a0ae..e37d466ba482332d0a693bffd3841b96475433af 100644
--- a/chrome/renderer/net/prescient_networking_dispatcher.cc
+++ b/chromecast/renderer/prescient_networking_dispatcher.cc
@@ -1,12 +1,13 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/renderer/net/prescient_networking_dispatcher.h"
+#include "chromecast/renderer/prescient_networking_dispatcher.h"
-#include "base/strings/utf_string_conversions.h"
+#include "base/logging.h"
-using blink::WebPrescientNetworking;
+namespace chromecast {
+namespace shell {
PrescientNetworkingDispatcher::PrescientNetworkingDispatcher() {
}
@@ -16,9 +17,13 @@ PrescientNetworkingDispatcher::~PrescientNetworkingDispatcher() {
void PrescientNetworkingDispatcher::prefetchDNS(
const blink::WebString& hostname) {
+ VLOG(2) << "Prefetch DNS: " << hostname.utf8();
if (hostname.isEmpty())
return;
- std::string hostname_utf8 = base::UTF16ToUTF8(hostname);
+ std::string hostname_utf8 = hostname.utf8();
net_predictor_.Resolve(hostname_utf8.data(), hostname_utf8.length());
}
+
+} // namespace shell
+} // namespace chromecast

Powered by Google App Engine
This is Rietveld 408576698