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

Unified Diff: chrome/browser/browsing_data/browsing_data_helper.cc

Issue 2661543003: Introduce the concept of web schemes capable of storage (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_helper.cc
diff --git a/chrome/browser/browsing_data/browsing_data_helper.cc b/chrome/browser/browsing_data/browsing_data_helper.cc
index a40de7afb2c8e23f22f2be117abdb51b9bf92a92..6e4fcbe993f9b291a0214aa28f20c08b5bd5b3e9 100644
--- a/chrome/browser/browsing_data/browsing_data_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_helper.cc
@@ -4,22 +4,18 @@
#include "chrome/browser/browsing_data/browsing_data_helper.h"
+#include <vector>
+
#include "base/strings/utf_string_conversions.h"
-#include "chrome/common/url_constants.h"
-#include "content/public/browser/child_process_security_policy.h"
#include "extensions/common/constants.h"
#include "storage/browser/quota/special_storage_policy.h"
#include "url/gurl.h"
+#include "url/url_util.h"
// Static
bool BrowsingDataHelper::IsWebScheme(const std::string& scheme) {
- // All "web safe" schemes are valid, except `chrome-extension://`
- // and `chrome-devtools://`.
- content::ChildProcessSecurityPolicy* policy =
- content::ChildProcessSecurityPolicy::GetInstance();
- return (policy->IsWebSafeScheme(scheme) &&
- !BrowsingDataHelper::IsExtensionScheme(scheme) &&
- scheme != content::kChromeDevToolsScheme);
+ const std::vector<std::string>& schemes = url::GetWebStorageSchemes();
+ return std::find(schemes.begin(), schemes.end(), scheme) != schemes.end();
}
// Static
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698