Automated Commit: Committing new LKGM version 6953.0.0 for chromeos.
[chromium-blink-merge.git] / components / network_hints / renderer / renderer_preconnect.cc
blob41d8033478e7c58ad2954ff81951f05e6ae9b9a3
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // See header file for description of RendererPreconnect class
7 #include "components/network_hints/renderer/renderer_preconnect.h"
9 #include "components/network_hints/common/network_hints_common.h"
10 #include "components/network_hints/common/network_hints_messages.h"
11 #include "content/public/renderer/render_thread.h"
13 using content::RenderThread;
15 namespace network_hints {
17 RendererPreconnect::RendererPreconnect() {
20 RendererPreconnect::~RendererPreconnect() {
23 void RendererPreconnect::Preconnect(const GURL &url) {
24 if (!url.is_valid())
25 return;
27 RenderThread::Get()->Send(
28 new NetworkHintsMsg_Preconnect(url, 1));
31 } // namespace network_hints