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

Side by Side Diff: Source/core/frame/History.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 26 matching lines...) Expand all
37 #include "core/page/BackForwardClient.h" 37 #include "core/page/BackForwardClient.h"
38 #include "core/page/Page.h" 38 #include "core/page/Page.h"
39 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
40 #include "platform/weborigin/SecurityOrigin.h" 40 #include "platform/weborigin/SecurityOrigin.h"
41 #include "wtf/MainThread.h" 41 #include "wtf/MainThread.h"
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 History::History(Frame* frame) 45 History::History(Frame* frame)
46 : DOMWindowProperty(frame) 46 : DOMWindowProperty(frame)
47 , m_lastStateObjectRequested(0) 47 , m_lastStateObjectRequested(nullptr)
48 { 48 {
49 ScriptWrappable::init(this); 49 ScriptWrappable::init(this);
50 } 50 }
51 51
52 unsigned History::length() const 52 unsigned History::length() const
53 { 53 {
54 if (!m_frame) 54 if (!m_frame)
55 return 0; 55 return 0;
56 if (!m_frame->page()) 56 if (!m_frame->page())
57 return 0; 57 return 0;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 KURL fullURL = urlForState(urlString); 131 KURL fullURL = urlForState(urlString);
132 if (!fullURL.isValid() || !m_frame->document()->securityOrigin()->canRequest (fullURL)) { 132 if (!fullURL.isValid() || !m_frame->document()->securityOrigin()->canRequest (fullURL)) {
133 // We can safely expose the URL to JavaScript, as a) no redirection take s place: JavaScript already had this URL, b) JavaScript can only access a same-o rigin History object. 133 // We can safely expose the URL to JavaScript, as a) no redirection take s place: JavaScript already had this URL, b) JavaScript can only access a same-o rigin History object.
134 exceptionState.throwSecurityError("A history state object with URL '" + fullURL.elidedString() + "' cannot be created in a document with origin '" + m_f rame->document()->securityOrigin()->toString() + "'."); 134 exceptionState.throwSecurityError("A history state object with URL '" + fullURL.elidedString() + "' cannot be created in a document with origin '" + m_f rame->document()->securityOrigin()->toString() + "'.");
135 return; 135 return;
136 } 136 }
137 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig ationHistoryApi, data, updateBackForwardListPolicy); 137 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig ationHistoryApi, data, updateBackForwardListPolicy);
138 } 138 }
139 139
140 } // namespace WebCore 140 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698