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

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

Issue 6882038: Move writing information to the lockbox after registering with the DM server. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/policy/policy_notifier.h" 5 #include "chrome/browser/policy/policy_notifier.h"
6 6
7 namespace policy { 7 namespace policy {
8 8
9 void PolicyNotifier::AddObserver(CloudPolicySubsystem::Observer* observer) { 9 void PolicyNotifier::AddObserver(CloudPolicySubsystem::Observer* observer) {
10 observer_list_.AddObserver(observer); 10 observer_list_.AddObserver(observer);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 error_details_ = CloudPolicySubsystem::NO_DETAILS; 50 error_details_ = CloudPolicySubsystem::NO_DETAILS;
51 } else if (s[TOKEN_FETCHER] == CloudPolicySubsystem::NETWORK_ERROR) { 51 } else if (s[TOKEN_FETCHER] == CloudPolicySubsystem::NETWORK_ERROR) {
52 state_ = s[TOKEN_FETCHER]; 52 state_ = s[TOKEN_FETCHER];
53 error_details_ = e[TOKEN_FETCHER]; 53 error_details_ = e[TOKEN_FETCHER];
54 } else if (s[TOKEN_FETCHER] == CloudPolicySubsystem::BAD_GAIA_TOKEN) { 54 } else if (s[TOKEN_FETCHER] == CloudPolicySubsystem::BAD_GAIA_TOKEN) {
55 state_ = s[TOKEN_FETCHER]; 55 state_ = s[TOKEN_FETCHER];
56 error_details_ = e[TOKEN_FETCHER]; 56 error_details_ = e[TOKEN_FETCHER];
57 } else if (s[POLICY_CONTROLLER] == CloudPolicySubsystem::NETWORK_ERROR) { 57 } else if (s[POLICY_CONTROLLER] == CloudPolicySubsystem::NETWORK_ERROR) {
58 state_ = s[POLICY_CONTROLLER]; 58 state_ = s[POLICY_CONTROLLER];
59 error_details_ = e[POLICY_CONTROLLER]; 59 error_details_ = e[POLICY_CONTROLLER];
60 } else if (s[POLICY_CONTROLLER] == CloudPolicySubsystem::TOKEN_FETCHED) {
61 state_ = s[POLICY_CONTROLLER];
62 error_details_ = e[POLICY_CONTROLLER];
60 } else { 63 } else {
61 state_ = s[POLICY_CACHE]; 64 state_ = s[POLICY_CACHE];
62 error_details_ = e[POLICY_CACHE]; 65 error_details_ = e[POLICY_CACHE];
63 } 66 }
64 67
65 FOR_EACH_OBSERVER(CloudPolicySubsystem::Observer, observer_list_, 68 FOR_EACH_OBSERVER(CloudPolicySubsystem::Observer, observer_list_,
66 OnPolicyStateChanged(state_, error_details_)); 69 OnPolicyStateChanged(state_, error_details_));
67 } 70 }
68 71
69 } // namespace policy 72 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698