| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Defines methods relevant to all code that wants to work with browsing data. |
| 6 |
| 7 #ifndef CHROME_BROWSER_BROWSING_DATA_HELPER_H_ |
| 8 #define CHROME_BROWSER_BROWSING_DATA_HELPER_H_ |
| 9 #pragma once |
| 10 |
| 11 #include <string> |
| 12 |
| 13 #include "base/basictypes.h" |
| 14 |
| 15 namespace WebKit { |
| 16 class WebString; |
| 17 } |
| 18 |
| 19 class GURL; |
| 20 |
| 21 class BrowsingDataHelper { |
| 22 public: |
| 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 |
| 25 // in ChildProcessSecurityPolicy, but excluding schemes like |
| 26 // `chrome-extension`. |
| 27 static bool IsValidScheme(const std::string& scheme); |
| 28 static bool IsValidScheme(const WebKit::WebString& scheme); |
| 29 static bool HasValidScheme(const GURL& origin); |
| 30 |
| 31 private: |
| 32 DISALLOW_IMPLICIT_CONSTRUCTORS(BrowsingDataHelper); |
| 33 }; |
| 34 |
| 35 #endif // CHROME_BROWSER_BROWSING_DATA_HELPER_H_ |
| OLD | NEW |