1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/prerender_condition_network.h"
7 #include "chromeos/network/network_state.h"
8 #include "chromeos/network/network_state_handler.h"
9 #include "chromeos/network/shill_property_util.h"
10 #include "third_party/cros_system_api/dbus/service_constants.h"
14 PrerenderConditionNetwork::PrerenderConditionNetwork() {
17 PrerenderConditionNetwork::~PrerenderConditionNetwork() {
20 bool PrerenderConditionNetwork::CanPrerender() const {
21 const NetworkState
* default_network
=
22 NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
23 return default_network
&&
24 !default_network
->Matches(NetworkTypePattern::Mobile());
27 } // namespace chromeos