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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. 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>
102 103
103 using blink::WebURLRequest; 104 using blink::WebURLRequest;
104 105
105 namespace blink { 106 namespace blink {
106 107
107 using namespace HTMLNames; 108 using namespace HTMLNames;
108 109
109 bool isBackForwardLoadType(FrameLoadType type) 110 bool isBackForwardLoadType(FrameLoadType type)
110 { 111 {
111 return type == FrameLoadTypeBackForward || type == FrameLoadTypeInitialHisto ryLoad; 112 return type == FrameLoadTypeBackForward || type == FrameLoadTypeInitialHisto ryLoad;
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 1594
1594 // FIXME: We need a way to propagate insecure requests policy flags to 1595 // FIXME: We need a way to propagate insecure requests policy flags to
1595 // out-of-process frames. For now, we'll always use default behavior. 1596 // out-of-process frames. For now, we'll always use default behavior.
1596 if (!parentFrame->isLocalFrame()) 1597 if (!parentFrame->isLocalFrame())
1597 return nullptr; 1598 return nullptr;
1598 1599
1599 ASSERT(toLocalFrame(parentFrame)->document()); 1600 ASSERT(toLocalFrame(parentFrame)->document());
1600 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1601 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1601 } 1602 }
1602 1603
1603 PassOwnPtr<TracedValue> FrameLoader::toTracedValue() const 1604 std::unique_ptr<TracedValue> FrameLoader::toTracedValue() const
1604 { 1605 {
1605 OwnPtr<TracedValue> tracedValue = TracedValue::create(); 1606 std::unique_ptr<TracedValue> tracedValue = TracedValue::create();
1606 tracedValue->beginDictionary("frame"); 1607 tracedValue->beginDictionary("frame");
1607 tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get())))); 1608 tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get()))));
1608 tracedValue->endDictionary(); 1609 tracedValue->endDictionary();
1609 tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame()); 1610 tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame());
1610 tracedValue->setString("stateMachine", m_stateMachine.toString()); 1611 tracedValue->setString("stateMachine", m_stateMachine.toString());
1611 tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument Loader ? m_provisionalDocumentLoader->url() : String()); 1612 tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument Loader ? m_provisionalDocumentLoader->url() : String());
1612 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1613 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1613 return tracedValue; 1614 return tracedValue;
1614 } 1615 }
1615 1616
1616 inline void FrameLoader::takeObjectSnapshot() const 1617 inline void FrameLoader::takeObjectSnapshot() const
1617 { 1618 {
1618 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1619 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1619 } 1620 }
1620 1621
1621 } // namespace blink 1622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698