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

Side by Side Diff: components/signin/core/browser/profile_oauth2_token_service.cc

Issue 813133003: New Profile metric for Auth Errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Headers cleanup Created 5 years, 11 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
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 #include "components/signin/core/browser/profile_oauth2_token_service.h" 5 #include "components/signin/core/browser/profile_oauth2_token_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "components/signin/core/browser/signin_client.h" 11 #include "components/signin/core/browser/signin_client.h"
12 #include "components/signin/core/browser/signin_error_controller.h" 12 #include "components/signin/core/browser/signin_error_controller.h"
13 #include "google_apis/gaia/gaia_auth_util.h" 13 #include "google_apis/gaia/gaia_auth_util.h"
14 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
15 15
16 ProfileOAuth2TokenService::ProfileOAuth2TokenService() 16 ProfileOAuth2TokenService::ProfileOAuth2TokenService()
17 : client_(NULL) {} 17 : client_(NULL) {}
18 18
19 ProfileOAuth2TokenService::~ProfileOAuth2TokenService() { 19 ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {
20 DCHECK(!signin_error_controller_.get()) << 20 DCHECK(!signin_error_controller_.get()) <<
21 "ProfileOAuth2TokenService::Initialize called but not " 21 "ProfileOAuth2TokenService::Initialize called but not "
22 "ProfileOAuth2TokenService::Shutdown"; 22 "ProfileOAuth2TokenService::Shutdown";
23 } 23 }
24 24
25 void ProfileOAuth2TokenService::Initialize(SigninClient* client) { 25 void ProfileOAuth2TokenService::Initialize(SigninClient* client) {
26 DCHECK(client); 26 DCHECK(client);
27 DCHECK(!client_); 27 DCHECK(!client_);
28 client_ = client; 28 client_ = client;
29 29
30 signin_error_controller_.reset(new SigninErrorController()); 30 signin_error_controller_.reset(new SigninErrorController(client));
31 } 31 }
32 32
33 void ProfileOAuth2TokenService::Shutdown() { 33 void ProfileOAuth2TokenService::Shutdown() {
34 DCHECK(client_) << "Shutdown() called without matching call to Initialize()"; 34 DCHECK(client_) << "Shutdown() called without matching call to Initialize()";
35 signin_error_controller_.reset(); 35 signin_error_controller_.reset();
36 } 36 }
37 37
38 net::URLRequestContextGetter* ProfileOAuth2TokenService::GetRequestContext() { 38 net::URLRequestContextGetter* ProfileOAuth2TokenService::GetRequestContext() {
39 return NULL; 39 return NULL;
40 } 40 }
(...skipping 28 matching lines...) Expand all
69 69
70 void ProfileOAuth2TokenService::UpdateCredentials( 70 void ProfileOAuth2TokenService::UpdateCredentials(
71 const std::string& account_id, 71 const std::string& account_id,
72 const std::string& refresh_token) { 72 const std::string& refresh_token) {
73 NOTREACHED(); 73 NOTREACHED();
74 } 74 }
75 75
76 void ProfileOAuth2TokenService::RevokeAllCredentials() { 76 void ProfileOAuth2TokenService::RevokeAllCredentials() {
77 // Empty implementation by default. 77 // Empty implementation by default.
78 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698