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

Side by Side Diff: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc

Issue 23712002: Cleanup network type matching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Generalized network type matching. 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
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 "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 26 matching lines...) Expand all
37 LOG(WARNING) << "Integer value " << value 37 LOG(WARNING) << "Integer value " << value
38 << " out of numeric limits, ignoring."; 38 << " out of numeric limits, ignoring.";
39 return NULL; 39 return NULL;
40 } 40 }
41 41
42 return Value::CreateIntegerValue(static_cast<int>(value)); 42 return Value::CreateIntegerValue(static_cast<int>(value));
43 } 43 }
44 44
45 Value* DecodeConnectionType(int value) { 45 Value* DecodeConnectionType(int value) {
46 static const char* const kConnectionTypes[] = { 46 static const char* const kConnectionTypes[] = {
47 shill::kTypeEthernetEap,
47 flimflam::kTypeEthernet, 48 flimflam::kTypeEthernet,
48 flimflam::kTypeWifi, 49 flimflam::kTypeWifi,
49 flimflam::kTypeWimax, 50 flimflam::kTypeWimax,
50 flimflam::kTypeBluetooth, 51 flimflam::kTypeBluetooth,
51 flimflam::kTypeCellular, 52 flimflam::kTypeCellular,
52 }; 53 };
53 54
54 if (value < 0 || value >= static_cast<int>(arraysize(kConnectionTypes))) 55 if (value < 0 || value >= static_cast<int>(arraysize(kConnectionTypes)))
55 return NULL; 56 return NULL;
56 57
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 DecodeLoginPolicies(policy, policies); 675 DecodeLoginPolicies(policy, policies);
675 DecodeKioskPolicies(policy, policies, install_attributes); 676 DecodeKioskPolicies(policy, policies, install_attributes);
676 DecodeNetworkPolicies(policy, policies, install_attributes); 677 DecodeNetworkPolicies(policy, policies, install_attributes);
677 DecodeReportingPolicies(policy, policies); 678 DecodeReportingPolicies(policy, policies);
678 DecodeAutoUpdatePolicies(policy, policies); 679 DecodeAutoUpdatePolicies(policy, policies);
679 DecodeAccessibilityPolicies(policy, policies); 680 DecodeAccessibilityPolicies(policy, policies);
680 DecodeGenericPolicies(policy, policies); 681 DecodeGenericPolicies(policy, policies);
681 } 682 }
682 683
683 } // namespace policy 684 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698