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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java

Issue 2754103003: Adds metric to help assess last_n impact on tab restores. (Closed)
Patch Set: Removed canSaveUrl method because it was already implemented elsewhere. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 package org.chromium.chrome.browser.tab; 5 package org.chromium.chrome.browser.tab;
6 6
7 import android.os.SystemClock; 7 import android.os.SystemClock;
8 import android.support.annotation.IntDef; 8 import android.support.annotation.IntDef;
9 import android.view.View; 9 import android.view.View;
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 @Override 142 @Override
143 public void navigationEntryCommitted() { 143 public void navigationEntryCommitted() {
144 if (mTab.getNativePage() != null) { 144 if (mTab.getNativePage() != null) {
145 mTab.pushNativePageStateToNavigationEntry(); 145 mTab.pushNativePageStateToNavigationEntry();
146 } 146 }
147 } 147 }
148 148
149 @Override 149 @Override
150 public void didFinishLoad(long frameId, String validatedUrl, boolean isMainF rame) { 150 public void didFinishLoad(long frameId, String validatedUrl, boolean isMainF rame) {
151 if (isMainFrame) mTab.didFinishPageLoad(); 151 if (isMainFrame) mTab.didFinishPageLoad(validatedUrl);
152 PolicyAuditor auditor = AppHooks.get().getPolicyAuditor(); 152 PolicyAuditor auditor = AppHooks.get().getPolicyAuditor();
153 auditor.notifyAuditEvent( 153 auditor.notifyAuditEvent(
154 mTab.getApplicationContext(), AuditEvent.OPEN_URL_SUCCESS, valid atedUrl, ""); 154 mTab.getApplicationContext(), AuditEvent.OPEN_URL_SUCCESS, valid atedUrl, "");
155 } 155 }
156 156
157 @Override 157 @Override
158 public void didFailLoad( 158 public void didFailLoad(
159 boolean isMainFrame, int errorCode, String description, String faili ngUrl) { 159 boolean isMainFrame, int errorCode, String description, String faili ngUrl) {
160 mTab.updateThemeColorIfNeeded(true); 160 mTab.updateThemeColorIfNeeded(true);
161 RewindableIterator<TabObserver> observers = mTab.getTabObservers(); 161 RewindableIterator<TabObserver> observers = mTab.getTabObservers();
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 } 306 }
307 307
308 @Override 308 @Override
309 public void destroy() { 309 public void destroy() {
310 MediaCaptureNotificationService.updateMediaNotificationForTab( 310 MediaCaptureNotificationService.updateMediaNotificationForTab(
311 mTab.getApplicationContext(), mTab.getId(), 0, mTab.getUrl()); 311 mTab.getApplicationContext(), mTab.getId(), 0, mTab.getUrl());
312 super.destroy(); 312 super.destroy();
313 } 313 }
314 } 314 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698