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

Side by Side Diff: chromeos/network/managed_state.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/network/managed_state.h" 5 #include "chromeos/network/managed_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/network/device_state.h" 9 #include "chromeos/network/device_state.h"
10 #include "chromeos/network/favorite_state.h" 10 #include "chromeos/network/favorite_state.h"
11 #include "chromeos/network/network_event_log.h" 11 #include "chromeos/network/network_event_log.h"
12 #include "chromeos/network/network_state.h" 12 #include "chromeos/network/network_state.h"
13 #include "chromeos/network/shill_property_util.h" 13 #include "chromeos/network/network_type_pattern.h"
14 #include "third_party/cros_system_api/dbus/service_constants.h" 14 #include "third_party/cros_system_api/dbus/service_constants.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 bool ManagedState::Matches(const NetworkTypePattern& pattern) const { 18 bool ManagedState::Matches(const NetworkTypePattern& pattern) const {
19 return pattern.MatchesType(type()); 19 return pattern.MatchesType(type());
20 } 20 }
21 21
22 // static 22 // static
23 std::string ManagedState::TypeToString(ManagedType type) { 23 std::string ManagedState::TypeToString(ManagedType type) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return false; 147 return false;
148 } 148 }
149 new_value = static_cast<uint32>(double_value); 149 new_value = static_cast<uint32>(double_value);
150 if (*out_value == new_value) 150 if (*out_value == new_value)
151 return false; 151 return false;
152 *out_value = new_value; 152 *out_value = new_value;
153 return true; 153 return true;
154 } 154 }
155 155
156 } // namespace chromeos 156 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/network/network_change_notifier_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698