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

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

Issue 402403004: Refactoring : Move OnlineAttempt to chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove chromeos export Created 6 years, 5 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
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 "chrome/browser/chromeos/login/auth/online_attempt_host.h" 5 #include "chromeos/login/auth/online_attempt_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/chromeos/login/auth/online_attempt.h"
9 #include "chromeos/login/auth/auth_attempt_state.h" 8 #include "chromeos/login/auth/auth_attempt_state.h"
9 #include "chromeos/login/auth/online_attempt.h"
10 #include "chromeos/login/auth/user_context.h" 10 #include "chromeos/login/auth/user_context.h"
11 #include "components/user_manager/user_type.h" 11 #include "components/user_manager/user_type.h"
12 #include "content/public/browser/browser_context.h" 12 #include "content/public/browser/browser_context.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
stevenjb 2014/07/22 16:35:37 Layering violation.
Denis Kuznetsov (DE-MUC) 2014/07/24 15:22:13 Done.
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 OnlineAttemptHost::OnlineAttemptHost(Delegate* delegate) 17 OnlineAttemptHost::OnlineAttemptHost(Delegate* delegate)
18 : delegate_(delegate), weak_ptr_factory_(this) {} 18 : delegate_(delegate), weak_ptr_factory_(this) {
19 }
19 20
20 OnlineAttemptHost::~OnlineAttemptHost() { 21 OnlineAttemptHost::~OnlineAttemptHost() {
21 Reset(); 22 Reset();
22 } 23 }
23 24
24 void OnlineAttemptHost::Check(content::BrowserContext* auth_context, 25 void OnlineAttemptHost::Check(content::BrowserContext* auth_context,
25 const UserContext& user_context) { 26 const UserContext& user_context) {
26 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 27 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
27 if (user_context != current_attempt_user_context_) { 28 if (user_context != current_attempt_user_context_) {
28 Reset(); 29 Reset();
(...skipping 28 matching lines...) Expand all
57 } 58 }
58 } 59 }
59 60
60 void OnlineAttemptHost::ResolveOnUIThread(bool success) { 61 void OnlineAttemptHost::ResolveOnUIThread(bool success) {
61 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 62 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
62 delegate_->OnChecked(current_attempt_user_context_.GetUserID(), success); 63 delegate_->OnChecked(current_attempt_user_context_.GetUserID(), success);
63 Reset(); 64 Reset();
64 } 65 }
65 66
66 } // namespace chromeos 67 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698