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. 4 5 #include "chrome/browser/chromeos/prerender_condition_network.h" 6 7 #include "chromeos/network/network_state.h" 8 #include "chromeos/network/network_state_handler.h" 9 #include "third_party/cros_system_api/dbus/service_constants.h" 10 11 namespace chromeos { 12 13 PrerenderConditionNetwork::PrerenderConditionNetwork() { 14 } 15 16 PrerenderConditionNetwork::~PrerenderConditionNetwork() { 17 } 18 19 bool PrerenderConditionNetwork::CanPrerender() const { 20 const NetworkState* default_network = 21 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); 22 return default_network && 23 !default_network->Matches(NetworkTypePattern::Mobile()); 24 } 25 26 } // namespace chromeos 27