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

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: 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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 1574
1574 // FIXME: We need a way to propagate insecure requests policy flags to 1575 // FIXME: We need a way to propagate insecure requests policy flags to
1575 // out-of-process frames. For now, we'll always use default behavior. 1576 // out-of-process frames. For now, we'll always use default behavior.
1576 if (!parentFrame->isLocalFrame()) 1577 if (!parentFrame->isLocalFrame())
1577 return nullptr; 1578 return nullptr;
1578 1579
1579 ASSERT(toLocalFrame(parentFrame)->document()); 1580 ASSERT(toLocalFrame(parentFrame)->document());
1580 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1581 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1581 } 1582 }
1582 1583
1583 PassOwnPtr<TracedValue> FrameLoader::toTracedValue() const 1584 std::unique_ptr<TracedValue> FrameLoader::toTracedValue() const
1584 { 1585 {
1585 OwnPtr<TracedValue> tracedValue = TracedValue::create(); 1586 std::unique_ptr<TracedValue> tracedValue = TracedValue::create();
1586 tracedValue->beginDictionary("frame"); 1587 tracedValue->beginDictionary("frame");
1587 tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get())))); 1588 tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get()))));
1588 tracedValue->endDictionary(); 1589 tracedValue->endDictionary();
1589 tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame()); 1590 tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame());
1590 tracedValue->setString("stateMachine", m_stateMachine.toString()); 1591 tracedValue->setString("stateMachine", m_stateMachine.toString());
1591 tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument Loader ? m_provisionalDocumentLoader->url() : String()); 1592 tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument Loader ? m_provisionalDocumentLoader->url() : String());
1592 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1593 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1593 return tracedValue; 1594 return tracedValue;
1594 } 1595 }
1595 1596
1596 inline void FrameLoader::takeObjectSnapshot() const 1597 inline void FrameLoader::takeObjectSnapshot() const
1597 { 1598 {
1598 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1599 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1599 } 1600 }
1600 1601
1601 } // namespace blink 1602 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698