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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.h

Issue 2442843002: Override SigninManager::SignOut if force-signin is enabled. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/signin/chrome_signin_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SIGNIN_CHROME_SIGNIN_CLIENT_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_
6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ 6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const GURL& url, 70 const GURL& url,
71 const std::string& name, 71 const std::string& name,
72 const net::CookieStore::CookieChangedCallback& callback) override; 72 const net::CookieStore::CookieChangedCallback& callback) override;
73 void OnSignedIn(const std::string& account_id, 73 void OnSignedIn(const std::string& account_id,
74 const std::string& gaia_id, 74 const std::string& gaia_id,
75 const std::string& username, 75 const std::string& username,
76 const std::string& password) override; 76 const std::string& password) override;
77 void PostSignedIn(const std::string& account_id, 77 void PostSignedIn(const std::string& account_id,
78 const std::string& username, 78 const std::string& username,
79 const std::string& password) override; 79 const std::string& password) override;
80 void PreSignOut(const base::Callback<void()>& sign_out) override;
80 81
81 // SigninErrorController::Observer implementation. 82 // SigninErrorController::Observer implementation.
82 void OnErrorChanged() override; 83 void OnErrorChanged() override;
83 84
84 // gaia::GaiaOAuthClient::Delegate implementation. 85 // gaia::GaiaOAuthClient::Delegate implementation.
85 void OnGetTokenInfoResponse( 86 void OnGetTokenInfoResponse(
86 std::unique_ptr<base::DictionaryValue> token_info) override; 87 std::unique_ptr<base::DictionaryValue> token_info) override;
87 void OnOAuthError() override; 88 void OnOAuthError() override;
88 void OnNetworkError(int response_code) override; 89 void OnNetworkError(int response_code) override;
89 90
90 // OAuth2TokenService::Consumer implementation 91 // OAuth2TokenService::Consumer implementation
91 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 92 void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
92 const std::string& access_token, 93 const std::string& access_token,
93 const base::Time& expiration_time) override; 94 const base::Time& expiration_time) override;
94 void OnGetTokenFailure(const OAuth2TokenService::Request* request, 95 void OnGetTokenFailure(const OAuth2TokenService::Request* request,
95 const GoogleServiceAuthError& error) override; 96 const GoogleServiceAuthError& error) override;
96 97
97 #if !defined(OS_CHROMEOS) 98 #if !defined(OS_CHROMEOS)
98 // net::NetworkChangeController::NetworkChangeObserver implementation. 99 // net::NetworkChangeController::NetworkChangeObserver implementation.
99 void OnNetworkChanged(net::NetworkChangeNotifier::ConnectionType type) 100 void OnNetworkChanged(net::NetworkChangeNotifier::ConnectionType type)
100 override; 101 override;
101 #endif 102 #endif
102 103
104 void AfterCredentialsCopied() override;
105
106 protected:
107 virtual void ShowUserManager(const base::FilePath& profile_path);
108 virtual void LockProfile(const base::FilePath& profile_path);
109
103 private: 110 private:
104 void MaybeFetchSigninTokenHandle(); 111 void MaybeFetchSigninTokenHandle();
105 112 void OnCloseBrowsersSuccess(const base::Callback<void()>& sign_out,
113 const base::FilePath& profile_path);
114 void OnCloseBrowsersAborted(const base::FilePath& profile_path);
106 Profile* profile_; 115 Profile* profile_;
107 116
108 SigninErrorController* signin_error_controller_; 117 SigninErrorController* signin_error_controller_;
109 #if !defined(OS_CHROMEOS) 118 #if !defined(OS_CHROMEOS)
110 std::list<base::Closure> delayed_callbacks_; 119 std::list<base::Closure> delayed_callbacks_;
111 #endif 120 #endif
112 121
122 bool is_force_signin_enabled_;
123 bool should_display_user_manager_ = true;
124
113 std::unique_ptr<gaia::GaiaOAuthClient> oauth_client_; 125 std::unique_ptr<gaia::GaiaOAuthClient> oauth_client_;
114 std::unique_ptr<OAuth2TokenService::Request> oauth_request_; 126 std::unique_ptr<OAuth2TokenService::Request> oauth_request_;
115 127
116 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); 128 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient);
117 }; 129 };
118 130
119 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ 131 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/chrome_signin_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698