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

Side by Side Diff: chromeos/login/auth/online_attempt.cc

Issue 552323003: Changing the order of initialization WeakPtrFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chromeos/login/auth/online_attempt.h ('k') | chromeos/tpm_password_fetcher.h » ('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 #include "chromeos/login/auth/online_attempt.h" 5 #include "chromeos/login/auth/online_attempt.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 16 matching lines...) Expand all
27 namespace chromeos { 27 namespace chromeos {
28 28
29 // static 29 // static
30 const int OnlineAttempt::kClientLoginTimeoutMs = 10000; 30 const int OnlineAttempt::kClientLoginTimeoutMs = 10000;
31 31
32 OnlineAttempt::OnlineAttempt(AuthAttemptState* current_attempt, 32 OnlineAttempt::OnlineAttempt(AuthAttemptState* current_attempt,
33 AuthAttemptStateResolver* callback) 33 AuthAttemptStateResolver* callback)
34 : message_loop_(base::MessageLoopProxy::current()), 34 : message_loop_(base::MessageLoopProxy::current()),
35 attempt_(current_attempt), 35 attempt_(current_attempt),
36 resolver_(callback), 36 resolver_(callback),
37 weak_factory_(this), 37 try_again_(true),
38 try_again_(true) { 38 weak_factory_(this) {
39 DCHECK(attempt_->user_type == user_manager::USER_TYPE_REGULAR); 39 DCHECK(attempt_->user_type == user_manager::USER_TYPE_REGULAR);
40 } 40 }
41 41
42 OnlineAttempt::~OnlineAttempt() { 42 OnlineAttempt::~OnlineAttempt() {
43 // Just to be sure. 43 // Just to be sure.
44 if (client_fetcher_.get()) 44 if (client_fetcher_.get())
45 client_fetcher_->CancelRequest(); 45 client_fetcher_->CancelRequest();
46 } 46 }
47 47
48 void OnlineAttempt::Initiate(net::URLRequestContextGetter* request_context) { 48 void OnlineAttempt::Initiate(net::URLRequestContextGetter* request_context) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 } 144 }
145 145
146 void OnlineAttempt::TriggerResolve(const AuthFailure& outcome) { 146 void OnlineAttempt::TriggerResolve(const AuthFailure& outcome) {
147 attempt_->RecordOnlineLoginStatus(outcome); 147 attempt_->RecordOnlineLoginStatus(outcome);
148 client_fetcher_.reset(NULL); 148 client_fetcher_.reset(NULL);
149 resolver_->Resolve(); 149 resolver_->Resolve();
150 } 150 }
151 151
152 } // namespace chromeos 152 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/login/auth/online_attempt.h ('k') | chromeos/tpm_password_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698