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

Side by Side Diff: content/public/common/url_utils.cc

Issue 15021020: content: Extract url utility functions into url_utils.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix content_unittests and content_browsertests Created 7 years, 7 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 | « content/public/common/url_utils.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/common/url_utils.h"
6
7 #include "build/build_config.h"
8 #include "content/common/savable_url_schemes.h"
9 #include "content/public/common/url_constants.h"
10 #include "googleurl/src/gurl.h"
11
12 namespace content {
13
14 const char* const* GetSavableSchemes() {
15 return GetSavableSchemesInternal();
16 }
17
18 bool HasWebUIScheme(const GURL& url) {
19 return
20 #if !defined(OS_IOS)
21 url.SchemeIs(chrome::kChromeDevToolsScheme) ||
22 url.SchemeIs(chrome::kChromeInternalScheme) ||
23 #endif
24 url.SchemeIs(chrome::kChromeUIScheme);
25 }
26
27 bool IsSavableURL(const GURL& url) {
28 for (int i = 0; GetSavableSchemes()[i] != NULL; ++i) {
29 if (url.SchemeIs(GetSavableSchemes()[i]))
30 return true;
31 }
32 return false;
33 }
34
35 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/url_utils.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698