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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_client.cc

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (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 "components/policy/core/common/cloud/cloud_policy_client.h" 5 #include "components/policy/core/common/cloud/cloud_policy_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "components/policy/core/common/cloud/device_management_service.h" 11 #include "components/policy/core/common/cloud/device_management_service.h"
12 #include "google_apis/gaia/gaia_constants.h" 12 #include "google_apis/gaia/gaia_constants.h"
13 #include "google_apis/gaia/gaia_urls.h" 13 #include "google_apis/gaia/gaia_urls.h"
14 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
15 15
16 namespace em = enterprise_management; 16 namespace em = enterprise_management;
17 17
18 namespace policy { 18 namespace policy {
19 19
20 namespace { 20 namespace {
21 21
22 // Translates the DeviceRegisterResponse::DeviceMode |mode| to the enum used 22 // Translates the DeviceRegisterResponse::DeviceMode |mode| to the enum used
23 // internally to represent different device modes. 23 // internally to represent different device modes.
24 DeviceMode TranslateProtobufDeviceMode( 24 DeviceMode TranslateProtobufDeviceMode(
25 em::DeviceRegisterResponse::DeviceMode mode) { 25 em::DeviceRegisterResponse::DeviceMode mode) {
26 switch (mode) { 26 switch (mode) {
27 case em::DeviceRegisterResponse::ENTERPRISE: 27 case em::DeviceRegisterResponse::ENTERPRISE:
28 return DEVICE_MODE_ENTERPRISE; 28 return DEVICE_MODE_ENTERPRISE;
29 case em::DeviceRegisterResponse::RETAIL: 29 case em::DeviceRegisterResponse::RETAIL:
30 return DEVICE_MODE_RETAIL_KIOSK; 30 return DEVICE_MODE_LEGACY_RETAIL_MODE;
31 } 31 }
32 LOG(ERROR) << "Unknown enrollment mode in registration response: " << mode; 32 LOG(ERROR) << "Unknown enrollment mode in registration response: " << mode;
33 return DEVICE_MODE_NOT_SET; 33 return DEVICE_MODE_NOT_SET;
34 } 34 }
35 35
36 bool IsChromePolicy(const std::string& type) { 36 bool IsChromePolicy(const std::string& type) {
37 return type == dm_protocol::kChromeDevicePolicyType || 37 return type == dm_protocol::kChromeDevicePolicyType ||
38 type == GetChromeUserPolicyType(); 38 type == GetChromeUserPolicyType();
39 } 39 }
40 40
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 void CloudPolicyClient::NotifyRobotAuthCodesFetched() { 479 void CloudPolicyClient::NotifyRobotAuthCodesFetched() {
480 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this)); 480 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this));
481 } 481 }
482 482
483 void CloudPolicyClient::NotifyClientError() { 483 void CloudPolicyClient::NotifyClientError() {
484 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this)); 484 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this));
485 } 485 }
486 486
487 } // namespace policy 487 } // namespace policy
OLDNEW
« no previous file with comments | « chromeos/settings/cros_settings_names.cc ('k') | components/policy/core/common/cloud/cloud_policy_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698