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

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

Issue 1110323005: Expose SW accesses in "Cookies set by this page" UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 5 years, 7 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
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 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 content::ResourceContext* context) { 1468 content::ResourceContext* context) {
1469 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1469 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1470 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1470 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1471 return io_data->GetCookieSettings()-> 1471 return io_data->GetCookieSettings()->
1472 IsSettingCookieAllowed(manifest_url, first_party); 1472 IsSettingCookieAllowed(manifest_url, first_party);
1473 } 1473 }
1474 1474
1475 bool ChromeContentBrowserClient::AllowServiceWorker( 1475 bool ChromeContentBrowserClient::AllowServiceWorker(
1476 const GURL& scope, 1476 const GURL& scope,
1477 const GURL& first_party_url, 1477 const GURL& first_party_url,
1478 content::ResourceContext* context) { 1478 content::ResourceContext* context,
1479 int render_process_id,
1480 int render_frame_id) {
1479 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1481 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1482 DCHECK(scope.is_valid());
1483 DCHECK(first_party_url.is_valid());
1484
1480 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1485 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1481 return io_data->GetCookieSettings()-> 1486 bool allow = io_data->GetCookieSettings()->IsSettingCookieAllowed(
1482 IsSettingCookieAllowed(scope, first_party_url); 1487 scope, first_party_url);
1488
1489 // Record access to database for potential display in UI.
1490 BrowserThread::PostTask(
1491 BrowserThread::UI, FROM_HERE,
1492 base::Bind(&TabSpecificContentSettings::ServiceWorkerAccessed,
1493 render_process_id, render_frame_id, scope, !allow));
1494 return allow;
1483 } 1495 }
1484 1496
1485 bool ChromeContentBrowserClient::AllowGetCookie( 1497 bool ChromeContentBrowserClient::AllowGetCookie(
1486 const GURL& url, 1498 const GURL& url,
1487 const GURL& first_party, 1499 const GURL& first_party,
1488 const net::CookieList& cookie_list, 1500 const net::CookieList& cookie_list,
1489 content::ResourceContext* context, 1501 content::ResourceContext* context,
1490 int render_process_id, 1502 int render_process_id,
1491 int render_frame_id) { 1503 int render_frame_id) {
1492 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1504 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 switches::kDisableWebRtcEncryption, 2446 switches::kDisableWebRtcEncryption,
2435 }; 2447 };
2436 to_command_line->CopySwitchesFrom(from_command_line, 2448 to_command_line->CopySwitchesFrom(from_command_line,
2437 kWebRtcDevSwitchNames, 2449 kWebRtcDevSwitchNames,
2438 arraysize(kWebRtcDevSwitchNames)); 2450 arraysize(kWebRtcDevSwitchNames));
2439 } 2451 }
2440 } 2452 }
2441 #endif // defined(ENABLE_WEBRTC) 2453 #endif // defined(ENABLE_WEBRTC)
2442 2454
2443 } // namespace chrome 2455 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/content_settings/tab_specific_content_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698