Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5493)

Unified Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.cc

Issue 2658203002: Convert DriveWebContentsManager to use the new navigation callbacks. (Closed)
Patch Set: a Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698