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

Unified Diff: chrome/browser/browsing_data_quota_helper_impl.cc

Issue 9958107: Limiting the "Cookies and site data" form to "web safe" schemes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The others. Created 8 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_quota_helper_impl.cc
diff --git a/chrome/browser/browsing_data_quota_helper_impl.cc b/chrome/browser/browsing_data_quota_helper_impl.cc
index 04a9a734300e2f03e50e5e06c8d15f699c807ae7..af0d8c1e93c717ccdf86205ec8a4fc4ffa6fd61a 100644
--- a/chrome/browser/browsing_data_quota_helper_impl.cc
+++ b/chrome/browser/browsing_data_quota_helper_impl.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
+#include "content/public/browser/child_process_security_policy.h"
#include "webkit/quota/quota_manager.h"
using content::BrowserThread;
@@ -85,10 +86,12 @@ void BrowsingDataQuotaHelperImpl::FetchQuotaInfo() {
void BrowsingDataQuotaHelperImpl::GotOrigins(
const std::set<GURL>& origins, quota::StorageType type) {
+ content::ChildProcessSecurityPolicy* policy =
+ content::ChildProcessSecurityPolicy::GetInstance();
for (std::set<GURL>::const_iterator itr = origins.begin();
itr != origins.end();
++itr)
- if (!itr->SchemeIs(chrome::kExtensionScheme))
+ if (policy->IsWebSafeScheme(itr->scheme()))
pending_hosts_.insert(std::make_pair(itr->host(), type));
DCHECK(type == quota::kStorageTypeTemporary ||

Powered by Google App Engine
This is Rietveld 408576698