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

Side by Side Diff: chrome/browser/policy/cloud_policy_identity_strategy.h

Issue 7233006: Store/Retrieve CrOS user policy in session_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_IDENTITY_STRATEGY_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_IDENTITY_STRATEGY_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_IDENTITY_STRATEGY_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_IDENTITY_STRATEGY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // values to the provided pointers. 68 // values to the provided pointers.
69 virtual bool GetCredentials(std::string* username, 69 virtual bool GetCredentials(std::string* username,
70 std::string* auth_token) = 0; 70 std::string* auth_token) = 0;
71 71
72 // Notifies the identity strategy that a new token has been fetched. It is up 72 // Notifies the identity strategy that a new token has been fetched. It is up
73 // to the identity strategy to store the token, decide whether it is going 73 // to the identity strategy to store the token, decide whether it is going
74 // to be used, send out an appropriate OnDeviceTokenChanged() notification 74 // to be used, send out an appropriate OnDeviceTokenChanged() notification
75 // and return the new token in GetDeviceToken() calls. 75 // and return the new token in GetDeviceToken() calls.
76 virtual void OnDeviceTokenAvailable(const std::string& token) = 0; 76 virtual void OnDeviceTokenAvailable(const std::string& token) = 0;
77 77
78 // Start loading the token cache.
79 virtual void LoadTokenCache() {}
80
78 protected: 81 protected:
79 // Notify observers that the effective token has changed. 82 // Notify observers that the effective token has changed.
80 void NotifyDeviceTokenChanged(); 83 void NotifyDeviceTokenChanged();
81 84
82 // Notify observers about authentication data change. 85 // Notify observers about authentication data change.
83 void NotifyAuthChanged(); 86 void NotifyAuthChanged();
84 87
85 private: 88 private:
86 ObserverList<Observer, true> observer_list_; 89 ObserverList<Observer, true> observer_list_;
87 90
88 DISALLOW_COPY_AND_ASSIGN(CloudPolicyIdentityStrategy); 91 DISALLOW_COPY_AND_ASSIGN(CloudPolicyIdentityStrategy);
89 }; 92 };
90 93
91 } // namespace policy 94 } // namespace policy
92 95
93 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_IDENTITY_STRATEGY_H_ 96 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_IDENTITY_STRATEGY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698