| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/merge_session_xhr_request_waiter.h" | 5 #include "chrome/browser/chromeos/login/signin/merge_session_xhr_request_waiter.
h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" | 12 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" |
| 13 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" | 13 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 | 15 |
| 16 using content::BrowserThread; | 16 using content::BrowserThread; |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Maximum time for delaying XHR requests. | 22 // Maximum time for delaying XHR requests. |
| 23 const int kMaxRequestWaitTimeMS = 10000; | 23 const int kMaxRequestWaitTimeMS = 10000; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 85 if (!callback_.is_null()) { | 85 if (!callback_.is_null()) { |
| 86 BrowserThread::PostTask( | 86 BrowserThread::PostTask( |
| 87 BrowserThread::IO, FROM_HERE, callback_); | 87 BrowserThread::IO, FROM_HERE, callback_); |
| 88 } | 88 } |
| 89 weak_ptr_factory_.InvalidateWeakPtrs(); | 89 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 90 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 90 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace chromeos | 93 } // namespace chromeos |
| OLD | NEW |