summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/prerender_condition_network.cc
blob: 9033f80c8590aab812c9b0b4ea5f80ef24d4315f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2011 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/browser/chromeos/prerender_condition_network.h"

#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "third_party/cros_system_api/dbus/service_constants.h"

namespace chromeos {

PrerenderConditionNetwork::PrerenderConditionNetwork() {
}

PrerenderConditionNetwork::~PrerenderConditionNetwork() {
}

bool PrerenderConditionNetwork::CanPrerender() const {
  const NetworkState* default_network =
      NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
  return default_network &&
         !default_network->Matches(NetworkTypePattern::Mobile());
}

}  // namespace chromeos