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

Side by Side Diff: chrome/browser/policy/enrollment_status_chromeos.cc

Issue 12189011: Split up chrome/browser/policy subdirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, add chrome/browser/chromeos/policy/OWNERS Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/enrollment_status_chromeos.h"
6
7 namespace policy {
8
9 // static
10 EnrollmentStatus EnrollmentStatus::ForStatus(Status status) {
11 return EnrollmentStatus(status, DM_STATUS_SUCCESS,
12 CloudPolicyStore::STATUS_OK,
13 CloudPolicyValidatorBase::VALIDATION_OK);
14 }
15
16 // static
17 EnrollmentStatus EnrollmentStatus::ForRegistrationError(
18 DeviceManagementStatus client_status) {
19 return EnrollmentStatus(STATUS_REGISTRATION_FAILED, client_status,
20 CloudPolicyStore::STATUS_OK,
21 CloudPolicyValidatorBase::VALIDATION_OK);
22 }
23
24 // static
25 EnrollmentStatus EnrollmentStatus::ForFetchError(
26 DeviceManagementStatus client_status) {
27 return EnrollmentStatus(STATUS_POLICY_FETCH_FAILED, client_status,
28 CloudPolicyStore::STATUS_OK,
29 CloudPolicyValidatorBase::VALIDATION_OK);
30 }
31
32 // static
33 EnrollmentStatus EnrollmentStatus::ForValidationError(
34 CloudPolicyValidatorBase::Status validation_status) {
35 return EnrollmentStatus(STATUS_VALIDATION_FAILED, DM_STATUS_SUCCESS,
36 CloudPolicyStore::STATUS_OK, validation_status);
37 }
38
39 // static
40 EnrollmentStatus EnrollmentStatus::ForStoreError(
41 CloudPolicyStore::Status store_error,
42 CloudPolicyValidatorBase::Status validation_status) {
43 return EnrollmentStatus(STATUS_STORE_ERROR, DM_STATUS_SUCCESS,
44 store_error, validation_status);
45 }
46
47 EnrollmentStatus::EnrollmentStatus(
48 EnrollmentStatus::Status status,
49 DeviceManagementStatus client_status,
50 CloudPolicyStore::Status store_status,
51 CloudPolicyValidatorBase::Status validation_status)
52 : status_(status),
53 client_status_(client_status),
54 store_status_(store_status),
55 validation_status_(validation_status) {}
56
57 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/enrollment_status_chromeos.h ('k') | chrome/browser/policy/enterprise_install_attributes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698