diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 15:57:28 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 15:57:28 +0000 |
commit | 285f4bb89be91cb1942070a652f480dd56ac5065 (patch) | |
tree | b1e06257b0984a104e99b78120dc82832b122681 /content | |
parent | bea176645e8271b7649dbfc602e31ffe6460da24 (diff) | |
download | chromium_src-285f4bb89be91cb1942070a652f480dd56ac5065.zip chromium_src-285f4bb89be91cb1942070a652f480dd56ac5065.tar.gz chromium_src-285f4bb89be91cb1942070a652f480dd56ac5065.tar.bz2 |
content: Move more two url constants to content namespace.
R=jam@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10091023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 2 | ||||
-rw-r--r-- | content/public/common/url_constants.cc | 8 | ||||
-rw-r--r-- | content/public/common/url_constants.h | 8 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 26 |
4 files changed, 22 insertions, 22 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 8cf33aa..053b171 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -1454,7 +1454,7 @@ void WebContentsImpl::OnDidStartProvisionalLoadForFrame(int64 frame_id, bool is_main_frame, const GURL& opener_url, const GURL& url) { - bool is_error_page = (url.spec() == chrome::kUnreachableWebDataURL); + bool is_error_page = (url.spec() == content::kUnreachableWebDataURL); GURL validated_url(url); GURL validated_opener_url(opener_url); GetRenderViewHostImpl()->FilterURL( diff --git a/content/public/common/url_constants.cc b/content/public/common/url_constants.cc index bbc5c2f..806e9ed 100644 --- a/content/public/common/url_constants.cc +++ b/content/public/common/url_constants.cc @@ -59,6 +59,10 @@ const char kChromeUIKillURL[] = "chrome://kill"; const char kChromeUINetworkViewCacheURL[] = "chrome://view-http-cache/"; const char kChromeUIShorthangURL[] = "chrome://shorthang"; +} // namespace chrome + +namespace content { + // This error URL is loaded in normal web renderer processes, so it should not // have a chrome:// scheme that might let it be confused with a WebUI page. const char kUnreachableWebDataURL[] = "data:text/html,chromewebdata"; @@ -68,10 +72,6 @@ const char kUnreachableWebDataURL[] = "data:text/html,chromewebdata"; // scripted by other pages in the process. const char kSwappedOutURL[] = "swappedout://"; -} // namespace chrome - -namespace content { - const char** GetSavableSchemes() { return const_cast<const char**>(g_savable_schemes); } diff --git a/content/public/common/url_constants.h b/content/public/common/url_constants.h index dcf69d5..dedb3fe 100644 --- a/content/public/common/url_constants.h +++ b/content/public/common/url_constants.h @@ -52,16 +52,16 @@ CONTENT_EXPORT extern const char kChromeUIKillURL[]; CONTENT_EXPORT extern const char kChromeUINetworkViewCacheURL[]; CONTENT_EXPORT extern const char kChromeUIShorthangURL[]; +} // namespace chrome + +namespace content { + // Special URL used to start a navigation to an error page. extern const char kUnreachableWebDataURL[]; // Special URL used to swap out a view being rendered by another process. extern const char kSwappedOutURL[]; -} // namespace chrome - -namespace content { - // Null terminated list of schemes that are savable. This function can be // invoked on any thread. CONTENT_EXPORT const char** GetSavableSchemes(); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 99f71c9..1382274 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -1390,8 +1390,8 @@ void RenderViewImpl::SendUpdateState(const WebHistoryItem& item) { if (item.isNull()) return; - // Don't send state updates for chrome::kSwappedOutURL. - if (item.urlString() == WebString::fromUTF8(chrome::kSwappedOutURL)) + // Don't send state updates for content::kSwappedOutURL. + if (item.urlString() == WebString::fromUTF8(content::kSwappedOutURL)) return; Send(new ViewHostMsg_UpdateState( @@ -1430,7 +1430,7 @@ void RenderViewImpl::LoadNavigationErrorPage( } frame->loadHTMLString(*error_html, - GURL(chrome::kUnreachableWebDataURL), + GURL(content::kUnreachableWebDataURL), error.unreachableURL, replace); } @@ -2281,7 +2281,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( GetReferrerPolicyFromRequest(request)); if (is_swapped_out_) { - if (request.url() != GURL(chrome::kSwappedOutURL)) { + if (request.url() != GURL(content::kSwappedOutURL)) { // Targeted links may try to navigate a swapped out frame. Allow the // browser process to navigate the tab instead. Note that it is also // possible for non-targeted navigations (from this view) to arrive @@ -2299,7 +2299,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( return WebKit::WebNavigationPolicyIgnore; } - // Allow chrome::kSwappedOutURL to complete. + // Allow content::kSwappedOutURL to complete. return default_policy; } @@ -2853,13 +2853,13 @@ void RenderViewImpl::didCommitProvisionalLoad(WebFrame* frame, // We bump our Page ID to correspond with the new session history entry. page_id_ = next_page_id_++; - // Don't update history_page_ids_ (etc) for chrome::kSwappedOutURL, since + // Don't update history_page_ids_ (etc) for content::kSwappedOutURL, since // we don't want to forget the entry that was there, and since we will - // never come back to chrome::kSwappedOutURL. Note that we have to call + // never come back to content::kSwappedOutURL. Note that we have to call // UpdateSessionHistory and update page_id_ even in this case, so that // the current entry gets a state update and so that we don't send a // state update to the wrong entry when we swap back in. - if (GetLoadingUrl(frame) != GURL(chrome::kSwappedOutURL)) { + if (GetLoadingUrl(frame) != GURL(content::kSwappedOutURL)) { // Advance our offset in session history, applying the length limit. // There is now no forward history. history_list_offset_++; @@ -4447,15 +4447,15 @@ void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) { // Swap out and stop sending any IPC messages that are not ACKs. SetSwappedOut(true); - // Replace the page with a blank dummy URL. The unload handler will not be + // Replace the page with a blank dummy URL. The unload handler will not be // run a second time, thanks to a check in FrameLoader::stopLoading. // We use loadRequest instead of loadHTMLString because the former commits // synchronously. Otherwise a new navigation can interrupt the navigation - // to chrome::kSwappedOutURL. If that happens to be to the page we had been + // to content::kSwappedOutURL. If that happens to be to the page we had been // showing, then WebKit will never send a commit and we'll be left spinning. // TODO(creis): Need to add a better way to do this that avoids running the - // beforeunload handler. For now, we just run it a second time silently. - GURL swappedOutURL(chrome::kSwappedOutURL); + // beforeunload handler. For now, we just run it a second time silently. + GURL swappedOutURL(content::kSwappedOutURL); WebURLRequest request(swappedOutURL); webview()->mainFrame()->loadRequest(request); } @@ -4528,7 +4528,7 @@ bool RenderViewImpl::MaybeLoadAlternateErrorPage(WebFrame* frame, // Load an empty page first so there is an immediate response to the error, // and then kick off a request for the alternate error page. frame->loadHTMLString(std::string(), - GURL(chrome::kUnreachableWebDataURL), + GURL(content::kUnreachableWebDataURL), error.unreachableURL, replace); |