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

Side by Side Diff: chrome/browser/chromeos/policy/consumer_management_service.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 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"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chromeos/dbus/cryptohome/rpc.pb.h" 14 #include "chromeos/dbus/cryptohome/rpc.pb.h"
15 #include "chromeos/dbus/cryptohome_client.h" 15 #include "chromeos/dbus/cryptohome_client.h"
16 #include "policy/proto/device_management_backend.pb.h" 16 #include "policy/proto/device_management_backend.pb.h"
17 17
18 namespace em = enterprise_management; 18 namespace em = enterprise_management;
19 19
20 namespace { 20 namespace {
21 21
22 // Boot atttributes ID. 22 // Boot atttributes ID.
23 const char kAttributeOwnerId[] = "consumer_management.owner_id"; 23 const char kAttributeOwnerId[] = "consumer_management.owner_id";
24 24
25 // The string of Status enum. 25 // The string of Status enum.
26 const char* kStatusString[] = { 26 const char* const kStatusString[] = {
27 "StatusUnknown", 27 "StatusUnknown",
28 "StatusEnrolled", 28 "StatusEnrolled",
29 "StatusEnrolling", 29 "StatusEnrolling",
30 "StatusUnenrolled", 30 "StatusUnenrolled",
31 "StatusUnenrolling", 31 "StatusUnenrolling",
32 }; 32 };
33 33
34 COMPILE_ASSERT( 34 COMPILE_ASSERT(
35 arraysize(kStatusString) == policy::ConsumerManagementService::STATUS_LAST, 35 arraysize(kStatusString) == policy::ConsumerManagementService::STATUS_LAST,
36 "invalid kStatusString array size."); 36 "invalid kStatusString array size.");
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 callback.Run(true); 199 callback.Run(true);
200 } 200 }
201 201
202 void ConsumerManagementService::NotifyStatusChanged() { 202 void ConsumerManagementService::NotifyStatusChanged() {
203 FOR_EACH_OBSERVER(Observer, observers_, OnConsumerManagementStatusChanged()); 203 FOR_EACH_OBSERVER(Observer, observers_, OnConsumerManagementStatusChanged());
204 } 204 }
205 205
206 } // namespace policy 206 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698