Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/chromeos/prerender_condition_network.cc

Issue 300623008: Move NetworkTypePattern to its own file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/prerender_condition_network.h" 5 #include "chrome/browser/chromeos/prerender_condition_network.h"
6 6
7 #include "chromeos/network/network_state.h" 7 #include "chromeos/network/network_state.h"
8 #include "chromeos/network/network_state_handler.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" 9 #include "third_party/cros_system_api/dbus/service_constants.h"
11 10
12 namespace chromeos { 11 namespace chromeos {
13 12
14 PrerenderConditionNetwork::PrerenderConditionNetwork() { 13 PrerenderConditionNetwork::PrerenderConditionNetwork() {
15 } 14 }
16 15
17 PrerenderConditionNetwork::~PrerenderConditionNetwork() { 16 PrerenderConditionNetwork::~PrerenderConditionNetwork() {
18 } 17 }
19 18
20 bool PrerenderConditionNetwork::CanPrerender() const { 19 bool PrerenderConditionNetwork::CanPrerender() const {
21 const NetworkState* default_network = 20 const NetworkState* default_network =
22 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); 21 NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
23 return default_network && 22 return default_network &&
24 !default_network->Matches(NetworkTypePattern::Mobile()); 23 !default_network->Matches(NetworkTypePattern::Mobile());
25 } 24 }
26 25
27 } // namespace chromeos 26 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/network_portal_detector_impl_unittest.cc ('k') | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698