| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_navigation_throttle
.h" | 5 #include "chrome/browser/chromeos/login/signin/merge_session_navigation_throttle
.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/login/signin/merge_session_load_page.h" | 7 #include "chrome/browser/chromeos/login/signin/merge_session_load_page.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/navigation_handle.h" | 9 #include "content/public/browser/navigation_handle.h" |
| 10 | 10 |
| 11 // static | 11 // static |
| 12 scoped_ptr<content::NavigationThrottle> MergeSessionNavigationThrottle::Create( | 12 std::unique_ptr<content::NavigationThrottle> |
| 13 content::NavigationHandle* handle) { | 13 MergeSessionNavigationThrottle::Create(content::NavigationHandle* handle) { |
| 14 return scoped_ptr<content::NavigationThrottle>( | 14 return std::unique_ptr<content::NavigationThrottle>( |
| 15 new MergeSessionNavigationThrottle(handle)); | 15 new MergeSessionNavigationThrottle(handle)); |
| 16 } | 16 } |
| 17 | 17 |
| 18 MergeSessionNavigationThrottle::MergeSessionNavigationThrottle( | 18 MergeSessionNavigationThrottle::MergeSessionNavigationThrottle( |
| 19 content::NavigationHandle* handle) | 19 content::NavigationHandle* handle) |
| 20 : NavigationThrottle(handle), weak_factory_(this) { | 20 : NavigationThrottle(handle), weak_factory_(this) { |
| 21 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 21 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 22 } | 22 } |
| 23 | 23 |
| 24 MergeSessionNavigationThrottle::~MergeSessionNavigationThrottle() { | 24 MergeSessionNavigationThrottle::~MergeSessionNavigationThrottle() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 base::Bind(&MergeSessionNavigationThrottle::OnBlockingPageComplete, | 42 base::Bind(&MergeSessionNavigationThrottle::OnBlockingPageComplete, |
| 43 weak_factory_.GetWeakPtr()))) | 43 weak_factory_.GetWeakPtr()))) |
| 44 ->Show(); | 44 ->Show(); |
| 45 return content::NavigationThrottle::DEFER; | 45 return content::NavigationThrottle::DEFER; |
| 46 } | 46 } |
| 47 | 47 |
| 48 void MergeSessionNavigationThrottle::OnBlockingPageComplete() { | 48 void MergeSessionNavigationThrottle::OnBlockingPageComplete() { |
| 49 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 49 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 50 navigation_handle()->Resume(); | 50 navigation_handle()->Resume(); |
| 51 } | 51 } |
| OLD | NEW |