Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 namespace chromeos { | |
| 8 | |
| 9 PrerenderConditionNetwork::PrerenderConditionNetwork( | |
| 10 NetworkLibrary* network_library) : network_library_(network_library) { | |
| 11 DCHECK(network_library_); | |
| 12 } | |
| 13 | |
| 14 PrerenderConditionNetwork::~PrerenderConditionNetwork() { | |
| 15 } | |
| 16 | |
| 17 bool PrerenderConditionNetwork::CanPrerender() const { | |
| 18 const Network* active_network = network_library_->active_network(); | |
| 19 if (!active_network) | |
| 20 return false; | |
| 21 switch (active_network->type()) { | |
| 22 case TYPE_ETHERNET: | |
| 23 case TYPE_WIFI: | |
| 24 return true; | |
| 25 default: | |
| 26 return false; | |
| 27 } | |
| 28 } | |
|
Eric Shienbrood
2011/07/27 22:06:33
I think you're right to keep things simple for now
cbentzel
2011/07/28 13:00:32
The concern is more about usage caps at this point
| |
| 29 | |
| 30 } // namespace chromeos | |
| OLD | NEW |