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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2456353002: [dry-run] Trying frameloader::loadFailed. (Closed)
Patch Set: Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 frame()->loader().load( 2057 frame()->loader().load(
2058 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, 2058 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem,
2059 static_cast<HistoryLoadType>(webHistoryLoadType)); 2059 static_cast<HistoryLoadType>(webHistoryLoadType));
2060 } 2060 }
2061 2061
2062 bool WebLocalFrameImpl::canRenderFallbackContent() const { 2062 bool WebLocalFrameImpl::canRenderFallbackContent() const {
2063 DCHECK(frame()); 2063 DCHECK(frame());
2064 return frame()->owner() && frame()->owner()->canRenderFallbackContent(); 2064 return frame()->owner() && frame()->owner()->canRenderFallbackContent();
2065 } 2065 }
2066 2066
2067 void WebLocalFrameImpl::loadFailed() { 2067 void WebLocalFrameImpl::loadFailed(const WebURLError& error) {
2068 DCHECK(frame()); 2068 DCHECK(frame());
2069 if (frame()->owner()) 2069 FrameLoader& frameloader = frame()->loader();
2070 frame()->owner()->renderFallbackContent(); 2070 frameloader.loadFailed(frameloader.documentLoader(), error);
2071
2072 stopLoading();
2073 } 2071 }
2074 2072
2075 bool WebLocalFrameImpl::isLoading() const { 2073 bool WebLocalFrameImpl::isLoading() const {
2076 if (!frame() || !frame()->document()) 2074 if (!frame() || !frame()->document())
2077 return false; 2075 return false;
2078 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || 2076 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() ||
2079 frame()->loader().provisionalDocumentLoader() || 2077 frame()->loader().provisionalDocumentLoader() ||
2080 !frame()->document()->loadEventFinished(); 2078 !frame()->document()->loadEventFinished();
2081 } 2079 }
2082 2080
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2403 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2406 } else if (metric == "wasAlternateProtocolAvailable") { 2404 } else if (metric == "wasAlternateProtocolAvailable") {
2407 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2405 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2408 } else if (metric == "connectionInfo") { 2406 } else if (metric == "connectionInfo") {
2409 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2407 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2410 } 2408 }
2411 UseCounter::count(frame(), feature); 2409 UseCounter::count(frame(), feature);
2412 } 2410 }
2413 2411
2414 } // namespace blink 2412 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698