| Index: chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
| diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
| index 3b71d462e9f08315a16648ca91a3e73a7cb8706f..7875408fdf06ba72733851e19d4dd5d8914331fc 100644
|
| --- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
| +++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
| @@ -30,6 +30,7 @@
|
| #include "components/user_manager/user_manager.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| @@ -150,11 +151,8 @@ class DriveWebContentsManager : public content::WebContentsObserver,
|
| DriveFirstRunController::UMAOutcome outcome);
|
|
|
| // content::WebContentsObserver overrides:
|
| - void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host,
|
| - const GURL& validated_url,
|
| - int error_code,
|
| - const base::string16& error_description,
|
| - bool was_ignored_by_handler) override;
|
| + void DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) override;
|
|
|
| void DidFailLoad(content::RenderFrameHost* render_frame_host,
|
| const GURL& validated_url,
|
| @@ -254,13 +252,9 @@ void DriveWebContentsManager::RunCompletionCallback(
|
| completion_callback_.Run(success, outcome);
|
| }
|
|
|
| -void DriveWebContentsManager::DidFailProvisionalLoad(
|
| - content::RenderFrameHost* render_frame_host,
|
| - const GURL& validated_url,
|
| - int error_code,
|
| - const base::string16& error_description,
|
| - bool was_ignored_by_handler) {
|
| - if (!render_frame_host->GetParent()) {
|
| +void DriveWebContentsManager::DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (navigation_handle->IsInMainFrame() && navigation_handle->IsErrorPage()) {
|
| LOG(WARNING) << "Failed to load WebContents to enable offline mode.";
|
| OnOfflineInit(false,
|
| DriveFirstRunController::OUTCOME_WEB_CONTENTS_LOAD_FAILED);
|
|
|