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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 } 1542 }
1543 1543
1544 bool FrameLoader::shouldClose(bool isReload) { 1544 bool FrameLoader::shouldClose(bool isReload) {
1545 Page* page = m_frame->page(); 1545 Page* page = m_frame->page();
1546 if (!page || !page->chromeClient().canOpenBeforeUnloadConfirmPanel()) 1546 if (!page || !page->chromeClient().canOpenBeforeUnloadConfirmPanel())
1547 return true; 1547 return true;
1548 1548
1549 // Store all references to each subframe in advance since beforeunload's event 1549 // Store all references to each subframe in advance since beforeunload's event
1550 // handler may modify frame 1550 // handler may modify frame
1551 HeapVector<Member<LocalFrame>> targetFrames; 1551 HeapVector<Member<LocalFrame>> targetFrames;
1552 targetFrames.append(m_frame); 1552 targetFrames.push_back(m_frame);
1553 for (Frame* child = m_frame->tree().firstChild(); child; 1553 for (Frame* child = m_frame->tree().firstChild(); child;
1554 child = child->tree().traverseNext(m_frame)) { 1554 child = child->tree().traverseNext(m_frame)) {
1555 // FIXME: There is not yet any way to dispatch events to out-of-process 1555 // FIXME: There is not yet any way to dispatch events to out-of-process
1556 // frames. 1556 // frames.
1557 if (child->isLocalFrame()) 1557 if (child->isLocalFrame())
1558 targetFrames.append(toLocalFrame(child)); 1558 targetFrames.push_back(toLocalFrame(child));
1559 } 1559 }
1560 1560
1561 bool shouldClose = false; 1561 bool shouldClose = false;
1562 { 1562 {
1563 NavigationDisablerForUnload navigationDisabler; 1563 NavigationDisablerForUnload navigationDisabler;
1564 size_t i; 1564 size_t i;
1565 1565
1566 bool didAllowNavigation = false; 1566 bool didAllowNavigation = false;
1567 for (i = 0; i < targetFrames.size(); i++) { 1567 for (i = 0; i < targetFrames.size(); i++) {
1568 if (!targetFrames[i]->tree().isDescendantOf(m_frame)) 1568 if (!targetFrames[i]->tree().isDescendantOf(m_frame))
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 m_documentLoader ? m_documentLoader->url() : String()); 1896 m_documentLoader ? m_documentLoader->url() : String());
1897 return tracedValue; 1897 return tracedValue;
1898 } 1898 }
1899 1899
1900 inline void FrameLoader::takeObjectSnapshot() const { 1900 inline void FrameLoader::takeObjectSnapshot() const {
1901 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1901 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1902 toTracedValue()); 1902 toTracedValue());
1903 } 1903 }
1904 1904
1905 } // namespace blink 1905 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698