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

Side by Side Diff: chromeos/network/managed_state.cc

Issue 23712002: Cleanup network type matching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test in Debug. Created 7 years, 3 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
« no previous file with comments | « chromeos/network/managed_state.h ('k') | chromeos/network/network_change_notifier_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "third_party/cros_system_api/dbus/service_constants.h" 14 #include "third_party/cros_system_api/dbus/service_constants.h"
14 15
15 namespace chromeos { 16 namespace chromeos {
16 17
18 bool ManagedState::Matches(const NetworkTypePattern& pattern) const {
19 return pattern.MatchesType(type());
20 }
21
17 ManagedState::ManagedState(ManagedType type, const std::string& path) 22 ManagedState::ManagedState(ManagedType type, const std::string& path)
18 : managed_type_(type), 23 : managed_type_(type),
19 path_(path), 24 path_(path),
20 update_received_(false), 25 update_received_(false),
21 update_requested_(false) { 26 update_requested_(false) {
22 } 27 }
23 28
24 ManagedState::~ManagedState() { 29 ManagedState::~ManagedState() {
25 } 30 }
26 31
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return false; 129 return false;
125 } 130 }
126 new_value = static_cast<uint32>(double_value); 131 new_value = static_cast<uint32>(double_value);
127 if (*out_value == new_value) 132 if (*out_value == new_value)
128 return false; 133 return false;
129 *out_value = new_value; 134 *out_value = new_value;
130 return true; 135 return true;
131 } 136 }
132 137
133 } // namespace chromeos 138 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/managed_state.h ('k') | chromeos/network/network_change_notifier_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698