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

Side by Side Diff: chrome/browser/invalidation/profile_invalidation_auth_provider.cc

Issue 179843002: Make invalidations work for Chrome OS Kiosk Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge error leading to uninitialized memory access. Created 6 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) 2014 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/invalidation/profile_invalidation_auth_provider.h"
6
7 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
8 #include "components/signin/core/profile_oauth2_token_service.h"
9
10 namespace invalidation {
11
12 ProfileInvalidationAuthProvider::ProfileInvalidationAuthProvider(
13 SigninManagerBase* signin_manager,
14 ProfileOAuth2TokenService* token_service,
15 LoginUIService* login_ui_service)
16 : signin_manager_(signin_manager),
17 token_service_(token_service),
18 login_ui_service_(login_ui_service) {
19 signin_manager_->AddObserver(this);
20 }
21
22 ProfileInvalidationAuthProvider::~ProfileInvalidationAuthProvider() {
23 signin_manager_->RemoveObserver(this);
24 }
25
26 std::string ProfileInvalidationAuthProvider::GetAccountId() {
27 return signin_manager_->GetAuthenticatedAccountId();
28 }
29
30 OAuth2TokenService* ProfileInvalidationAuthProvider::GetTokenService() {
31 return token_service_;
32 }
33
34 bool ProfileInvalidationAuthProvider::ShowLoginUI() {
35 login_ui_service_->ShowLoginPopup();
36 return true;
37 }
38
39 void ProfileInvalidationAuthProvider::GoogleSignedOut(
40 const std::string& username) {
41 FireInvalidationAuthLogout();
42 }
43
44 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698