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

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

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, nit Created 6 years, 1 month 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
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_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.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/port.h" 10 #include "base/port.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Product_S/N is still special-cased due to inconsistencies with serial 48 // Product_S/N is still special-cased due to inconsistencies with serial
49 // numbers on Lumpy devices: On these devices, serial_number is identical to 49 // numbers on Lumpy devices: On these devices, serial_number is identical to
50 // Product_S/N with an appended checksum. Unfortunately, the sticker on the 50 // Product_S/N with an appended checksum. Unfortunately, the sticker on the
51 // packaging doesn't include that checksum either (the sticker on the device 51 // packaging doesn't include that checksum either (the sticker on the device
52 // does though!). The former sticker is the source of the serial number used by 52 // does though!). The former sticker is the source of the serial number used by
53 // device management service, so we prefer Product_S/N over serial number to 53 // device management service, so we prefer Product_S/N over serial number to
54 // match the server. 54 // match the server.
55 // 55 //
56 // TODO(mnissler): Move serial_number back to the top once the server side uses 56 // TODO(mnissler): Move serial_number back to the top once the server side uses
57 // the correct serial number. 57 // the correct serial number.
58 const char* kMachineInfoSerialNumberKeys[] = { 58 const char* const kMachineInfoSerialNumberKeys[] = {
59 "Product_S/N", // Lumpy/Alex devices 59 "Product_S/N", // Lumpy/Alex devices
60 "serial_number", // VPD v2+ devices 60 "serial_number", // VPD v2+ devices
61 "Product_SN", // Mario 61 "Product_SN", // Mario
62 "sn", // old ZGB devices (more recent ones use serial_number) 62 "sn", // old ZGB devices (more recent ones use serial_number)
63 }; 63 };
64 64
65 // Fetches a machine statistic value from StatisticsProvider, returns an empty 65 // Fetches a machine statistic value from StatisticsProvider, returns an empty
66 // string on failure. 66 // string on failure.
67 std::string GetMachineStatistic(const std::string& key) { 67 std::string GetMachineStatistic(const std::string& key) {
68 std::string value; 68 std::string value;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 local_state_->SetBoolean( 255 local_state_->SetBoolean(
256 prefs::kDeviceEnrollmentCanExit, 256 prefs::kDeviceEnrollmentCanExit,
257 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey, 257 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey,
258 false)); 258 false));
259 } 259 }
260 } 260 }
261 } 261 }
262 } 262 }
263 263
264 } // namespace policy 264 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698