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

Unified Diff: chrome/browser/chromeos/login/signin/token_handle_fetcher.h

Issue 1294543008: ChromeOS: fix crash in TokenHandleFetcher destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/signin/token_handle_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/signin/token_handle_fetcher.h
diff --git a/chrome/browser/chromeos/login/signin/token_handle_fetcher.h b/chrome/browser/chromeos/login/signin/token_handle_fetcher.h
index e63394ddcf9632a2e7ce9eb02561d44679942a69..5c471a4384c3319c91feafc318da4a1134c88bd9 100644
--- a/chrome/browser/chromeos/login/signin/token_handle_fetcher.h
+++ b/chrome/browser/chromeos/login/signin/token_handle_fetcher.h
@@ -12,6 +12,7 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
#include "components/user_manager/user_id.h"
#include "google_apis/gaia/gaia_oauth_client.h"
#include "google_apis/gaia/oauth2_token_service.h"
@@ -63,6 +64,9 @@ class TokenHandleFetcher : public gaia::GaiaOAuthClient::Delegate,
void RequestAccessToken(const std::string& account_id);
void FillForAccessToken(const std::string& access_token);
+ // This is called before profile is detroyed.
+ void OnProfileDestroyed();
+
TokenHandleUtil* token_handle_util_;
user_manager::UserID user_id_;
OAuth2TokenService* token_service_;
@@ -74,6 +78,8 @@ class TokenHandleFetcher : public gaia::GaiaOAuthClient::Delegate,
TokenFetchingCallback callback_;
scoped_ptr<gaia::GaiaOAuthClient> gaia_client_;
scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_;
+ scoped_ptr<KeyedServiceShutdownNotifier::Subscription>
+ profile_shutdown_notification_;
DISALLOW_COPY_AND_ASSIGN(TokenHandleFetcher);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/signin/token_handle_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698