Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/net_error_tab_helper.h" | 5 #include "chrome/browser/net/net_error_tab_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/io_thread.h" | 10 #include "chrome/browser/io_thread.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 } | 274 } |
| 275 | 275 |
| 276 ShowNetworkDiagnosticsDialog(web_contents(), sanitized_url); | 276 ShowNetworkDiagnosticsDialog(web_contents(), sanitized_url); |
| 277 } | 277 } |
| 278 | 278 |
| 279 #if BUILDFLAG(ANDROID_JAVA_UI) | 279 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 280 void NetErrorTabHelper::DownloadPageLaterHelper(const GURL& page_url) { | 280 void NetErrorTabHelper::DownloadPageLaterHelper(const GURL& page_url) { |
| 281 offline_pages::RequestCoordinator* request_coordinator = | 281 offline_pages::RequestCoordinator* request_coordinator = |
| 282 offline_pages::RequestCoordinatorFactory::GetForBrowserContext( | 282 offline_pages::RequestCoordinatorFactory::GetForBrowserContext( |
| 283 web_contents()->GetBrowserContext()); | 283 web_contents()->GetBrowserContext()); |
| 284 CHECK(request_coordinator); | |
|
fgorski
2016/11/22 21:45:14
check is guaranteeing a crash in incognito and I a
dougarnett
2016/11/22 22:01:16
Yes, that was my original plan. Was trying to resp
jianli
2016/11/22 22:06:36
The fix for not showing download page later button
| |
| 284 offline_pages::ClientId client_id( | 285 offline_pages::ClientId client_id( |
| 285 offline_pages::kAsyncNamespace, base::GenerateGUID()); | 286 offline_pages::kAsyncNamespace, base::GenerateGUID()); |
| 286 request_coordinator->SavePageLater( | 287 request_coordinator->SavePageLater( |
| 287 page_url, client_id, true /*user_requested*/, | 288 page_url, client_id, true /*user_requested*/, |
| 288 offline_pages::RequestCoordinator::RequestAvailability:: | 289 offline_pages::RequestCoordinator::RequestAvailability:: |
| 289 ENABLED_FOR_OFFLINER); | 290 ENABLED_FOR_OFFLINER); |
| 290 } | 291 } |
| 291 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 292 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 292 | 293 |
| 293 } // namespace chrome_browser_net | 294 } // namespace chrome_browser_net |
| OLD | NEW |