diff options
author | avi <avi@chromium.org> | 2015-06-11 13:21:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-11 20:21:57 +0000 |
commit | b1986b1606b6a31f7a92e2fa7dcd8be804c8f7e5 (patch) | |
tree | 5916dc4b249d893077d167dd7d650804a5245dae /content/browser/frame_host/navigation_controller_impl.cc | |
parent | 8468fd0f54379ac4ddc055689ac1951614d4bbd5 (diff) | |
download | chromium_src-b1986b1606b6a31f7a92e2fa7dcd8be804c8f7e5.zip chromium_src-b1986b1606b6a31f7a92e2fa7dcd8be804c8f7e5.tar.gz chromium_src-b1986b1606b6a31f7a92e2fa7dcd8be804c8f7e5.tar.bz2 |
Revert of Ensure the new navigation classifier works in the real world. (patchset #2 id:20001 of https://codereview.chromium.org/1171973004/)
Reason for revert:
We have an explanation.
Original issue's description:
> Ensure the new navigation classifier works in the real world.
>
> BUG=369661
> TEST=No whammies!
>
> Committed: https://crrev.com/39825ed5795d26cc69167c1fe774f23117cc8f77
> Cr-Commit-Position: refs/heads/master@{#333755}
TBR=creis@chromium.org,rsesek@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=369661
Review URL: https://codereview.chromium.org/1180933002
Cr-Commit-Position: refs/heads/master@{#334027}
Diffstat (limited to 'content/browser/frame_host/navigation_controller_impl.cc')
-rw-r--r-- | content/browser/frame_host/navigation_controller_impl.cc | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc index 3c25b2e..5d4dee8 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -6,7 +6,6 @@ #include "base/bind.h" #include "base/command_line.h" -#include "base/debug/crash_logging.h" #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" // Temporary @@ -793,11 +792,6 @@ bool NavigationControllerImpl::RendererDidNavigate( // Do navigation-type specific actions. These will make and commit an entry. details->type = ClassifyNavigation(rfh, params); NavigationType new_type = ClassifyNavigationWithoutPageID(rfh, params); - if (details->type == NAVIGATION_TYPE_NAV_IGNORE && - new_type == NAVIGATION_TYPE_NAV_IGNORE) { - base::debug::SetCrashKeyValue("369661-doubleignore", - rfh->CommitCountString()); - } bool ignore_mismatch = false; // There are disagreements on some Android bots over SAME_PAGE between the two // classifiers so ignore disagreements if that's the case. @@ -822,22 +816,7 @@ bool NavigationControllerImpl::RendererDidNavigate( ignore_mismatch = true; } if (!ignore_mismatch) { - base::debug::SetCrashKeyValue("369661-oldtype", - base::IntToString(details->type)); - base::debug::SetCrashKeyValue("369661-newtype", - base::IntToString(new_type)); - base::debug::SetCrashKeyValue("369661-navurl", params.url.spec()); - base::debug::SetCrashKeyValue("369661-naventryid", - base::IntToString(params.nav_entry_id)); - base::debug::SetCrashKeyValue("369661-didcreatenew", - params.did_create_new_entry ? "yes" : "no"); - base::debug::SetCrashKeyValue("369661-pageid", - base::IntToString(params.page_id)); - base::debug::SetCrashKeyValue( - "369661-maxpageid", - base::IntToString(delegate_->GetMaxPageIDForSiteInstance( - rfh->GetSiteInstance()))); - CHECK_EQ(details->type, new_type); + DCHECK_EQ(details->type, new_type); } // is_in_page must be computed before the entry gets committed. @@ -957,9 +936,6 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( // list. // // In these cases, there's nothing we can do with them, so ignore. - base::debug::SetCrashKeyValue("369661-oldignore", - rfh->CommitCountString() + - " no page id"); return NAVIGATION_TYPE_NAV_IGNORE; } @@ -976,12 +952,8 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( // navigated on a popup navigated to about:blank (the iframe would be // written into the popup by script on the main page). For these cases, // there isn't any navigation stuff we can do, so just ignore it. - if (!GetLastCommittedEntry()) { - base::debug::SetCrashKeyValue("369661-oldignore", - rfh->CommitCountString() + - " new subframe no last committed"); + if (!GetLastCommittedEntry()) return NAVIGATION_TYPE_NAV_IGNORE; - } // Valid subframe navigation. return NAVIGATION_TYPE_NEW_SUBFRAME; @@ -1032,9 +1004,6 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( } GURL url(temp); rfh->render_view_host()->Send(new ViewMsg_TempCrashWithData(url)); - base::debug::SetCrashKeyValue("369661-oldignore", - rfh->CommitCountString() + - " renderer smoking crack"); return NAVIGATION_TYPE_NAV_IGNORE; } NavigationEntryImpl* existing_entry = entries_[existing_entry_index].get(); @@ -1107,12 +1076,8 @@ NavigationType NavigationControllerImpl::ClassifyNavigationWithoutPageID( // navigated on a popup navigated to about:blank (the iframe would be // written into the popup by script on the main page). For these cases, // there isn't any navigation stuff we can do, so just ignore it. - if (!GetLastCommittedEntry()) { - base::debug::SetCrashKeyValue("369661-newignore", - rfh->CommitCountString() + - " new subframe no last committed"); + if (!GetLastCommittedEntry()) return NAVIGATION_TYPE_NAV_IGNORE; - } // Valid subframe navigation. return NAVIGATION_TYPE_NEW_SUBFRAME; @@ -1129,9 +1094,6 @@ NavigationType NavigationControllerImpl::ClassifyNavigationWithoutPageID( } else { // We ignore subframes created in non-committed pages; we'd appreciate if // people stopped doing that. - base::debug::SetCrashKeyValue("369661-newignore", - rfh->CommitCountString() + - " auto subframe no last committed"); return NAVIGATION_TYPE_NAV_IGNORE; } } @@ -1144,12 +1106,8 @@ NavigationType NavigationControllerImpl::ClassifyNavigationWithoutPageID( // scribble onto an uncommitted page. Again, there isn't any navigation // stuff that we can do, so ignore it here as well. NavigationEntry* last_committed = GetLastCommittedEntry(); - if (!last_committed) { - base::debug::SetCrashKeyValue("369661-newignore", - rfh->CommitCountString() + - " renderer-initiated no last committed"); + if (!last_committed) return NAVIGATION_TYPE_NAV_IGNORE; - } if (IsURLInPageNavigation(params.url, params.was_within_same_page, rfh)) { // This is history.replaceState(), which is renderer-initiated yet within @@ -1197,9 +1155,6 @@ NavigationType NavigationControllerImpl::ClassifyNavigationWithoutPageID( // to such entries). It could also mean that the renderer is smoking crack. // TODO(avi): Crash the renderer like we do in the old ClassifyNavigation? NOTREACHED() << "Could not find nav entry with id " << params.nav_entry_id; - base::debug::SetCrashKeyValue("369661-newignore", - rfh->CommitCountString() + - " renderer smoking crack"); return NAVIGATION_TYPE_NAV_IGNORE; } |