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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 9557009: IndexedDB: chrome-side changes for permission check from shared worker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to ToT and fix comment 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 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 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 for (i = render_views.begin(); i != render_views.end(); ++i) { 943 for (i = render_views.begin(); i != render_views.end(); ++i) {
944 BrowserThread::PostTask( 944 BrowserThread::PostTask(
945 BrowserThread::UI, FROM_HERE, 945 BrowserThread::UI, FROM_HERE,
946 base::Bind(&TabSpecificContentSettings::FileSystemAccessed, 946 base::Bind(&TabSpecificContentSettings::FileSystemAccessed,
947 i->first, i->second, url, !allow)); 947 i->first, i->second, url, !allow));
948 } 948 }
949 949
950 return allow; 950 return allow;
951 } 951 }
952 952
953 bool ChromeContentBrowserClient::AllowWorkerIndexedDB(
954 const GURL& url,
955 const string16& name,
956 content::ResourceContext* context,
957 const std::vector<std::pair<int, int> >& render_views) {
958 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
959 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
960 CookieSettings* cookie_settings = io_data->GetCookieSettings();
961 bool allow = cookie_settings->IsSettingCookieAllowed(url, url);
962
963 // Record access to IndexedDB for potential display in UI.
964 std::vector<std::pair<int, int> >::const_iterator i;
965 for (i = render_views.begin(); i != render_views.end(); ++i) {
966 BrowserThread::PostTask(
967 BrowserThread::UI, FROM_HERE,
968 base::Bind(&TabSpecificContentSettings::IndexedDBAccessed,
969 i->first, i->second, url, name, !allow));
970 }
971
972 return allow;
973 }
974
953 net::URLRequestContext* 975 net::URLRequestContext*
954 ChromeContentBrowserClient::OverrideRequestContextForURL( 976 ChromeContentBrowserClient::OverrideRequestContextForURL(
955 const GURL& url, content::ResourceContext* context) { 977 const GURL& url, content::ResourceContext* context) {
956 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 978 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
957 if (url.SchemeIs(chrome::kExtensionScheme)) { 979 if (url.SchemeIs(chrome::kExtensionScheme)) {
958 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 980 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
959 return io_data->extensions_request_context(); 981 return io_data->extensions_request_context();
960 } 982 }
961 983
962 return NULL; 984 return NULL;
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 #if defined(USE_NSS) 1552 #if defined(USE_NSS)
1531 crypto::CryptoModuleBlockingPasswordDelegate* 1553 crypto::CryptoModuleBlockingPasswordDelegate*
1532 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1554 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1533 const GURL& url) { 1555 const GURL& url) {
1534 return browser::NewCryptoModuleBlockingDialogDelegate( 1556 return browser::NewCryptoModuleBlockingDialogDelegate(
1535 browser::kCryptoModulePasswordKeygen, url.host()); 1557 browser::kCryptoModulePasswordKeygen, url.host());
1536 } 1558 }
1537 #endif 1559 #endif
1538 1560
1539 } // namespace chrome 1561 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698