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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/page/EventSource.cpp ('k') | Source/core/page/Location.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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return KURL(baseURL, urlString); 137 return KURL(baseURL, urlString);
138 } 138 }
139 139
140 void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const Str ing& title, const String& urlString, StateObjectType stateObjectType, ExceptionC ode& ec) 140 void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const Str ing& title, const String& urlString, StateObjectType stateObjectType, ExceptionC ode& ec)
141 { 141 {
142 if (!m_frame || !m_frame->page()) 142 if (!m_frame || !m_frame->page())
143 return; 143 return;
144 144
145 KURL fullURL = urlForState(urlString); 145 KURL fullURL = urlForState(urlString);
146 if (!fullURL.isValid() || !m_frame->document()->securityOrigin()->canRequest (fullURL)) { 146 if (!fullURL.isValid() || !m_frame->document()->securityOrigin()->canRequest (fullURL)) {
147 ec = SECURITY_ERR; 147 ec = SecurityError;
148 return; 148 return;
149 } 149 }
150 150
151 if (stateObjectType == StateObjectPush) 151 if (stateObjectType == StateObjectPush)
152 m_frame->loader()->history()->pushState(data, title, fullURL.string()); 152 m_frame->loader()->history()->pushState(data, title, fullURL.string());
153 else if (stateObjectType == StateObjectReplace) 153 else if (stateObjectType == StateObjectReplace)
154 m_frame->loader()->history()->replaceState(data, title, fullURL.string() ); 154 m_frame->loader()->history()->replaceState(data, title, fullURL.string() );
155 155
156 if (!urlString.isEmpty()) 156 if (!urlString.isEmpty())
157 m_frame->document()->updateURLForPushOrReplaceState(fullURL); 157 m_frame->document()->updateURLForPushOrReplaceState(fullURL);
158 158
159 m_frame->loader()->client()->dispatchDidNavigateWithinPage(); 159 m_frame->loader()->client()->dispatchDidNavigateWithinPage();
160 } 160 }
161 161
162 } // namespace WebCore 162 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/page/Location.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698