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

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

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/consumer_management_service.h" 5 #include "chrome/browser/chromeos/policy/consumer_management_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // The string of Status enum. 26 // The string of Status enum.
27 const char* const kStatusString[] = { 27 const char* const kStatusString[] = {
28 "StatusUnknown", 28 "StatusUnknown",
29 "StatusEnrolled", 29 "StatusEnrolled",
30 "StatusEnrolling", 30 "StatusEnrolling",
31 "StatusUnenrolled", 31 "StatusUnenrolled",
32 "StatusUnenrolling", 32 "StatusUnenrolling",
33 }; 33 };
34 34
35 COMPILE_ASSERT( 35 static_assert(
36 arraysize(kStatusString) == policy::ConsumerManagementService::STATUS_LAST, 36 arraysize(kStatusString) == policy::ConsumerManagementService::STATUS_LAST,
37 "invalid kStatusString array size."); 37 "invalid kStatusString array size");
38 38
39 } // namespace 39 } // namespace
40 40
41 namespace policy { 41 namespace policy {
42 42
43 ConsumerManagementService::ConsumerManagementService( 43 ConsumerManagementService::ConsumerManagementService(
44 chromeos::CryptohomeClient* client, 44 chromeos::CryptohomeClient* client,
45 chromeos::DeviceSettingsService* device_settings_service) 45 chromeos::DeviceSettingsService* device_settings_service)
46 : client_(client), 46 : client_(client),
47 device_settings_service_(device_settings_service), 47 device_settings_service_(device_settings_service),
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (!dbus_success || reply.error() != 0) { 190 if (!dbus_success || reply.error() != 0) {
191 LOG(ERROR) << "Failed to flush and sign boot lockbox."; 191 LOG(ERROR) << "Failed to flush and sign boot lockbox.";
192 callback.Run(false); 192 callback.Run(false);
193 return; 193 return;
194 } 194 }
195 195
196 callback.Run(true); 196 callback.Run(true);
197 } 197 }
198 198
199 } // namespace policy 199 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698