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

Side by Side Diff: chrome/browser/browsing_data_helper.h

Issue 10454113: Renaming `BrowsingDataHelper::IsValidScheme`, as it's poorly descriptive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bernhard. Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Defines methods relevant to all code that wants to work with browsing data. 5 // Defines methods relevant to all code that wants to work with browsing data.
6 6
7 #ifndef CHROME_BROWSER_BROWSING_DATA_HELPER_H_ 7 #ifndef CHROME_BROWSER_BROWSING_DATA_HELPER_H_
8 #define CHROME_BROWSER_BROWSING_DATA_HELPER_H_ 8 #define CHROME_BROWSER_BROWSING_DATA_HELPER_H_
9 #pragma once 9 #pragma once
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 14
15 namespace WebKit { 15 namespace WebKit {
16 class WebString; 16 class WebString;
17 } 17 }
18 18
19 class GURL; 19 class GURL;
20 20
21 class BrowsingDataHelper { 21 class BrowsingDataHelper {
22 public: 22 public:
23 // Returns true iff the provided scheme is (really) web safe, and suitable 23 // Returns true iff the provided scheme is (really) web safe, and suitable
24 // for treatment as "browsing data". This relies on the definition of web safe 24 // for treatment as "browsing data". This relies on the definition of web safe
25 // in ChildProcessSecurityPolicy, but excluding schemes like 25 // in ChildProcessSecurityPolicy, but excluding schemes like
26 // `chrome-extension`. 26 // `chrome-extension`.
27 static bool IsValidScheme(const std::string& scheme); 27 static bool IsWebScheme(const std::string& scheme);
28 static bool IsValidScheme(const WebKit::WebString& scheme); 28 static bool IsWebScheme(const WebKit::WebString& scheme);
29 static bool HasValidScheme(const GURL& origin); 29 static bool HasWebScheme(const GURL& origin);
30
31 // Returns true iff the provided scheme is an extension.
32 static bool IsExtensionScheme(const std::string& scheme);
33 static bool IsExtensionScheme(const WebKit::WebString& scheme);
34 static bool HasExtensionScheme(const GURL& origin);
30 35
31 private: 36 private:
32 DISALLOW_IMPLICIT_CONSTRUCTORS(BrowsingDataHelper); 37 DISALLOW_IMPLICIT_CONSTRUCTORS(BrowsingDataHelper);
33 }; 38 };
34 39
35 #endif // CHROME_BROWSER_BROWSING_DATA_HELPER_H_ 40 #endif // CHROME_BROWSER_BROWSING_DATA_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_file_system_helper.cc ('k') | chrome/browser/browsing_data_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698