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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "platform/network/ResourceRequest.h" 92 #include "platform/network/ResourceRequest.h"
93 #include "platform/scroll/ScrollAnimatorBase.h" 93 #include "platform/scroll/ScrollAnimatorBase.h"
94 #include "platform/weborigin/SecurityOrigin.h" 94 #include "platform/weborigin/SecurityOrigin.h"
95 #include "platform/weborigin/SecurityPolicy.h" 95 #include "platform/weborigin/SecurityPolicy.h"
96 #include "platform/weborigin/Suborigin.h" 96 #include "platform/weborigin/Suborigin.h"
97 #include "public/platform/WebCachePolicy.h" 97 #include "public/platform/WebCachePolicy.h"
98 #include "public/platform/WebURLRequest.h" 98 #include "public/platform/WebURLRequest.h"
99 #include "wtf/TemporaryChange.h" 99 #include "wtf/TemporaryChange.h"
100 #include "wtf/text/CString.h" 100 #include "wtf/text/CString.h"
101 #include "wtf/text/WTFString.h" 101 #include "wtf/text/WTFString.h"
102 #include <memory>
103 102
104 using blink::WebURLRequest; 103 using blink::WebURLRequest;
105 104
106 namespace blink { 105 namespace blink {
107 106
108 using namespace HTMLNames; 107 using namespace HTMLNames;
109 108
110 bool isBackForwardLoadType(FrameLoadType type) 109 bool isBackForwardLoadType(FrameLoadType type)
111 { 110 {
112 return type == FrameLoadTypeBackForward || type == FrameLoadTypeInitialHisto ryLoad; 111 return type == FrameLoadTypeBackForward || type == FrameLoadTypeInitialHisto ryLoad;
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 1590
1592 // FIXME: We need a way to propagate insecure requests policy flags to 1591 // FIXME: We need a way to propagate insecure requests policy flags to
1593 // out-of-process frames. For now, we'll always use default behavior. 1592 // out-of-process frames. For now, we'll always use default behavior.
1594 if (!parentFrame->isLocalFrame()) 1593 if (!parentFrame->isLocalFrame())
1595 return nullptr; 1594 return nullptr;
1596 1595
1597 ASSERT(toLocalFrame(parentFrame)->document()); 1596 ASSERT(toLocalFrame(parentFrame)->document());
1598 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1597 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1599 } 1598 }
1600 1599
1601 std::unique_ptr<TracedValue> FrameLoader::toTracedValue() const 1600 PassOwnPtr<TracedValue> FrameLoader::toTracedValue() const
1602 { 1601 {
1603 std::unique_ptr<TracedValue> tracedValue = TracedValue::create(); 1602 OwnPtr<TracedValue> tracedValue = TracedValue::create();
1604 tracedValue->beginDictionary("frame"); 1603 tracedValue->beginDictionary("frame");
1605 tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get())))); 1604 tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get()))));
1606 tracedValue->endDictionary(); 1605 tracedValue->endDictionary();
1607 tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame()); 1606 tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame());
1608 tracedValue->setString("stateMachine", m_stateMachine.toString()); 1607 tracedValue->setString("stateMachine", m_stateMachine.toString());
1609 tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument Loader ? m_provisionalDocumentLoader->url() : String()); 1608 tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument Loader ? m_provisionalDocumentLoader->url() : String());
1610 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1609 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1611 return tracedValue; 1610 return tracedValue;
1612 } 1611 }
1613 1612
1614 inline void FrameLoader::takeObjectSnapshot() const 1613 inline void FrameLoader::takeObjectSnapshot() const
1615 { 1614 {
1616 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1615 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1617 } 1616 }
1618 1617
1619 } // namespace blink 1618 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698