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

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

Issue 2733393003: Split browsing data masks between content and embedder (Closed)
Patch Set: Rebase (merged automatically) Created 3 years, 9 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
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 6e4fcbe993f9b291a0214aa28f20c08b5bd5b3e9..3240b04673b279e3fba5707d2c95668f8031d80c 100644
--- a/chrome/browser/browsing_data/browsing_data_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_helper.cc
@@ -4,11 +4,11 @@
#include "chrome/browser/browsing_data/browsing_data_helper.h"
+#include <algorithm>
#include <vector>
#include "base/strings/utf_string_conversions.h"
#include "extensions/common/constants.h"
-#include "storage/browser/quota/special_storage_policy.h"
#include "url/gurl.h"
#include "url/url_util.h"
@@ -32,29 +32,3 @@ bool BrowsingDataHelper::IsExtensionScheme(const std::string& scheme) {
bool BrowsingDataHelper::HasExtensionScheme(const GURL& origin) {
return BrowsingDataHelper::IsExtensionScheme(origin.scheme());
}
-
-// Static
-bool BrowsingDataHelper::DoesOriginMatchMask(
- const GURL& origin,
- int origin_type_mask,
- storage::SpecialStoragePolicy* policy) {
- // Packaged apps and extensions match iff EXTENSION.
- if (BrowsingDataHelper::HasExtensionScheme(origin.GetOrigin()) &&
- origin_type_mask & EXTENSION)
- return true;
-
- // If a websafe origin is unprotected, it matches iff UNPROTECTED_WEB.
- if ((!policy || !policy->IsStorageProtected(origin.GetOrigin())) &&
- BrowsingDataHelper::HasWebScheme(origin.GetOrigin()) &&
- origin_type_mask & UNPROTECTED_WEB)
- return true;
-
- // Hosted applications (protected and websafe origins) iff PROTECTED_WEB.
- if (policy &&
- policy->IsStorageProtected(origin.GetOrigin()) &&
- BrowsingDataHelper::HasWebScheme(origin.GetOrigin()) &&
- origin_type_mask & PROTECTED_WEB)
- return true;
-
- return false;
-}
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_helper.h ('k') | chrome/browser/browsing_data/browsing_data_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698