| OLD | NEW |
| 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/signin/merge_session_throttle.h" | 5 #include "chrome/browser/chromeos/login/signin/merge_session_throttle.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/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "content/public/browser/resource_request_info.h" | 27 #include "content/public/browser/resource_request_info.h" |
| 28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
| 30 #include "net/base/net_util.h" | 30 #include "net/base/net_util.h" |
| 31 #include "net/base/network_change_notifier.h" | 31 #include "net/base/network_change_notifier.h" |
| 32 #include "net/url_request/url_request.h" | 32 #include "net/url_request/url_request.h" |
| 33 #include "net/url_request/url_request_context.h" | 33 #include "net/url_request/url_request_context.h" |
| 34 | 34 |
| 35 using content::BrowserThread; | 35 using content::BrowserThread; |
| 36 using content::RenderViewHost; | 36 using content::RenderViewHost; |
| 37 using content::ResourceType; |
| 37 using content::WebContents; | 38 using content::WebContents; |
| 38 | 39 |
| 39 namespace { | 40 namespace { |
| 40 | 41 |
| 41 const int64 kMaxSessionRestoreTimeInSec = 60; | 42 const int64 kMaxSessionRestoreTimeInSec = 60; |
| 42 | 43 |
| 43 // The set of blocked profiles. | 44 // The set of blocked profiles. |
| 44 class ProfileSet : public base::NonThreadSafe, | 45 class ProfileSet : public base::NonThreadSafe, |
| 45 public std::set<Profile*> { | 46 public std::set<Profile*> { |
| 46 public: | 47 public: |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 Profile* profile = Profile::FromBrowserContext( | 267 Profile* profile = Profile::FromBrowserContext( |
| 267 web_contents->GetBrowserContext()); | 268 web_contents->GetBrowserContext()); |
| 268 (new chromeos::MergeSessionXHRRequestWaiter(profile, | 269 (new chromeos::MergeSessionXHRRequestWaiter(profile, |
| 269 callback))->StartWaiting(); | 270 callback))->StartWaiting(); |
| 270 } | 271 } |
| 271 } else { | 272 } else { |
| 272 BrowserThread::PostTask( | 273 BrowserThread::PostTask( |
| 273 BrowserThread::IO, FROM_HERE, callback); | 274 BrowserThread::IO, FROM_HERE, callback); |
| 274 } | 275 } |
| 275 } | 276 } |
| OLD | NEW |