OLD | NEW |
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/enterprise_install_attributes.h" | 5 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "chrome/browser/chromeos/policy/proto/install_attributes.pb.h" | 14 #include "chrome/browser/policy/proto/chromeos/install_attributes.pb.h" |
15 #include "chromeos/cryptohome/cryptohome_library.h" | 15 #include "chromeos/cryptohome/cryptohome_library.h" |
16 #include "chromeos/dbus/dbus_thread_manager.h" | 16 #include "chromeos/dbus/dbus_thread_manager.h" |
17 #include "google_apis/gaia/gaia_auth_util.h" | 17 #include "google_apis/gaia/gaia_auth_util.h" |
18 | 18 |
19 namespace policy { | 19 namespace policy { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Translates DeviceMode constants to strings used in the lockbox. | 23 // Translates DeviceMode constants to strings used in the lockbox. |
24 std::string GetDeviceModeString(DeviceMode mode) { | 24 std::string GetDeviceModeString(DeviceMode mode) { |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 std::string mode; | 325 std::string mode; |
326 if (ReadMapKey(attr_map, kAttrEnterpriseMode, &mode)) | 326 if (ReadMapKey(attr_map, kAttrEnterpriseMode, &mode)) |
327 registration_mode_ = GetDeviceModeFromString(mode); | 327 registration_mode_ = GetDeviceModeFromString(mode); |
328 } else if (enterprise_user.empty() && enterprise_owned != "true") { | 328 } else if (enterprise_user.empty() && enterprise_owned != "true") { |
329 // |registration_user_| is empty on consumer devices. | 329 // |registration_user_| is empty on consumer devices. |
330 registration_mode_ = DEVICE_MODE_CONSUMER; | 330 registration_mode_ = DEVICE_MODE_CONSUMER; |
331 } | 331 } |
332 } | 332 } |
333 | 333 |
334 } // namespace policy | 334 } // namespace policy |
OLD | NEW |