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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 10830316: Prefer Product_S/N when reading the serial number for enterprise enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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 "chrome/browser/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 #if defined(OS_CHROMEOS) 81 #if defined(OS_CHROMEOS)
82 // MachineInfo key names. 82 // MachineInfo key names.
83 const char kMachineInfoSystemHwqual[] = "hardware_class"; 83 const char kMachineInfoSystemHwqual[] = "hardware_class";
84 84
85 // These are the machine serial number keys that we check in order until we 85 // These are the machine serial number keys that we check in order until we
86 // find a non-empty serial number. The VPD spec says the serial number should be 86 // find a non-empty serial number. The VPD spec says the serial number should be
87 // in the "serial_number" key for v2+ VPDs. However, legacy devices used a 87 // in the "serial_number" key for v2+ VPDs. However, legacy devices used a
88 // different keys to report their serial number, which we fall back to if 88 // different keys to report their serial number, which we fall back to if
89 // "serial_number" is not present. 89 // "serial_number" is not present.
90 //
91 // Product_S/N is still special-cased due to inconsistencies with serial
92 // numbers on Lumpy devices: On these devices, serial_number is identical to
93 // Product_S/N with an appended checksum. Unfortunately, the sticker on the
94 // packaging doesn't include that checksum either (the sticker on the device
95 // does though!). The former sticker is the source of the serial number used by
96 // device management service, so we prefer Product_S/N over serial number to
97 // match the server.
98 //
99 // TODO(mnissler): Move serial_number back to the top once the server side uses
100 // the correct serial number.
90 const char* kMachineInfoSerialNumberKeys[] = { 101 const char* kMachineInfoSerialNumberKeys[] = {
102 "Product_S/N", // Lumpy/Alex devices
91 "serial_number", // VPD v2+ devices 103 "serial_number", // VPD v2+ devices
92 "Product_S/N", // Alex
93 "Product_SN", // Mario 104 "Product_SN", // Mario
94 "sn", // old ZGB devices (more recent ones use serial_number) 105 "sn", // old ZGB devices (more recent ones use serial_number)
95 }; 106 };
96 #endif 107 #endif
97 108
98 // Used in BrowserPolicyConnector::SetPolicyProviderForTesting. 109 // Used in BrowserPolicyConnector::SetPolicyProviderForTesting.
99 ConfigurationPolicyProvider* g_testing_provider = NULL; 110 ConfigurationPolicyProvider* g_testing_provider = NULL;
100 111
101 } // namespace 112 } // namespace
102 113
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 return new AsyncPolicyProvider(loader.Pass()); 616 return new AsyncPolicyProvider(loader.Pass());
606 } else { 617 } else {
607 return NULL; 618 return NULL;
608 } 619 }
609 #else 620 #else
610 return NULL; 621 return NULL;
611 #endif 622 #endif
612 } 623 }
613 624
614 } // namespace policy 625 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698