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

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, 2 months 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 if (mode == em::DeviceRegisterResponse::ENTERPRISE)
27 case em::DeviceRegisterResponse::ENTERPRISE: 27 return DEVICE_MODE_ENTERPRISE;
28 return DEVICE_MODE_ENTERPRISE;
29 case em::DeviceRegisterResponse::RETAIL:
30 return DEVICE_MODE_RETAIL_KIOSK;
31 }
32 LOG(ERROR) << "Unknown enrollment mode in registration response: " << mode; 28 LOG(ERROR) << "Unknown enrollment mode in registration response: " << mode;
33 return DEVICE_MODE_NOT_SET; 29 return DEVICE_MODE_NOT_SET;
bartfab (slow) 2014/10/15 09:52:21 We will now reach this line on retail mode devices
rkc 2014/11/20 21:06:34 Leaving this code as is. We aren't removing the de
34 } 30 }
35 31
36 bool IsChromePolicy(const std::string& type) { 32 bool IsChromePolicy(const std::string& type) {
37 return type == dm_protocol::kChromeDevicePolicyType || 33 return type == dm_protocol::kChromeDevicePolicyType ||
38 type == GetChromeUserPolicyType(); 34 type == GetChromeUserPolicyType();
39 } 35 }
40 36
41 } // namespace 37 } // namespace
42 38
43 CloudPolicyClient::Observer::~Observer() {} 39 CloudPolicyClient::Observer::~Observer() {}
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 466
471 void CloudPolicyClient::NotifyRobotAuthCodesFetched() { 467 void CloudPolicyClient::NotifyRobotAuthCodesFetched() {
472 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this)); 468 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this));
473 } 469 }
474 470
475 void CloudPolicyClient::NotifyClientError() { 471 void CloudPolicyClient::NotifyClientError() {
476 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this)); 472 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this));
477 } 473 }
478 474
479 } // namespace policy 475 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698