Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 // If access was blocked due to the user's content settings, | 156 // If access was blocked due to the user's content settings, |
| 157 // |blocked_by_policy| should be true, and this function should invoke | 157 // |blocked_by_policy| should be true, and this function should invoke |
| 158 // OnContentBlocked. | 158 // OnContentBlocked. |
| 159 static void FileSystemAccessed(int render_process_id, | 159 static void FileSystemAccessed(int render_process_id, |
| 160 int render_frame_id, | 160 int render_frame_id, |
| 161 const GURL& url, | 161 const GURL& url, |
| 162 bool blocked_by_policy); | 162 bool blocked_by_policy); |
| 163 | 163 |
| 164 // Called when a specific Service Worker scope was accessed. | 164 // Called when a specific Service Worker scope was accessed. |
| 165 // If access was blocked due to the user's content settings, | 165 // If access was blocked due to the user's content settings, |
| 166 // |blocked_by_policy| should be true, and this function should invoke | 166 // |blocked_by_policy| should be true, and this function should invoke |
|
falken
2016/10/05 01:16:50
nit: update this comment: there is no longer a |bl
shimazu
2016/10/05 02:10:57
Done.
| |
| 167 // OnContentBlocked. | 167 // OnContentBlocked. |
| 168 static void ServiceWorkerAccessed(int render_process_id, | 168 static void ServiceWorkerAccessed(int render_process_id, |
| 169 int render_frame_id, | 169 int render_frame_id, |
| 170 const GURL& scope, | 170 const GURL& scope, |
| 171 bool blocked_by_policy); | 171 bool blocked_by_policy_javascript, |
| 172 bool blocked_by_policy_cookie); | |
| 172 | 173 |
| 173 // Resets the |content_blocked_| and |content_allowed_| arrays, except for | 174 // Resets the |content_blocked_| and |content_allowed_| arrays, except for |
| 174 // CONTENT_SETTINGS_TYPE_COOKIES related information. | 175 // CONTENT_SETTINGS_TYPE_COOKIES related information. |
|
falken
2016/10/05 01:16:50
This comment is no longer true. Now it's COOKIES a
shimazu
2016/10/05 02:10:57
Done.
| |
| 175 // TODO(vabr): Only public for tests. Move to a test client. | 176 // TODO(vabr): Only public for tests. Move to a test client. |
| 176 void ClearBlockedContentSettingsExceptForCookies(); | 177 void ClearBlockedContentSettingsExceptForNavigationRelatedSettings(); |
| 177 | 178 |
| 178 // Resets all cookies related information. | 179 // Resets all cookies related information. |
|
falken
2016/10/05 01:16:50
ditto
shimazu
2016/10/05 02:10:57
Done.
| |
| 179 // TODO(vabr): Only public for tests. Move to a test client. | 180 // TODO(vabr): Only public for tests. Move to a test client. |
| 180 void ClearCookieSpecificContentSettings(); | 181 void ClearNavigationRelatedContentSettings(); |
| 181 | 182 |
| 182 // Changes the |content_blocked_| entry for popups. | 183 // Changes the |content_blocked_| entry for popups. |
| 183 void SetPopupsBlocked(bool blocked); | 184 void SetPopupsBlocked(bool blocked); |
| 184 | 185 |
| 185 // Changes the |content_blocked_| entry for downloads. | 186 // Changes the |content_blocked_| entry for downloads. |
| 186 void SetDownloadsBlocked(bool blocked); | 187 void SetDownloadsBlocked(bool blocked); |
| 187 | 188 |
| 188 // Changes |subresource_filter_enabled_| entry for the Safe Browsing | 189 // Changes |subresource_filter_enabled_| entry for the Safe Browsing |
| 189 // Subresource Filter. | 190 // Subresource Filter. |
| 190 void SetSubresourceBlocked(bool enabled); | 191 void SetSubresourceBlocked(bool enabled); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 344 const net::CookieOptions& options, | 345 const net::CookieOptions& options, |
| 345 bool blocked_by_policy); | 346 bool blocked_by_policy); |
| 346 void OnFileSystemAccessed(const GURL& url, | 347 void OnFileSystemAccessed(const GURL& url, |
| 347 bool blocked_by_policy); | 348 bool blocked_by_policy); |
| 348 void OnIndexedDBAccessed(const GURL& url, | 349 void OnIndexedDBAccessed(const GURL& url, |
| 349 const base::string16& description, | 350 const base::string16& description, |
| 350 bool blocked_by_policy); | 351 bool blocked_by_policy); |
| 351 void OnLocalStorageAccessed(const GURL& url, | 352 void OnLocalStorageAccessed(const GURL& url, |
| 352 bool local, | 353 bool local, |
| 353 bool blocked_by_policy); | 354 bool blocked_by_policy); |
| 354 void OnServiceWorkerAccessed(const GURL& scope, bool blocked_by_policy); | 355 void OnServiceWorkerAccessed(const GURL& scope, |
| 356 bool blocked_by_policy_javascript, | |
| 357 bool blocked_by_policy_cookie); | |
| 355 void OnWebDatabaseAccessed(const GURL& url, | 358 void OnWebDatabaseAccessed(const GURL& url, |
| 356 const base::string16& name, | 359 const base::string16& name, |
| 357 const base::string16& display_name, | 360 const base::string16& display_name, |
| 358 bool blocked_by_policy); | 361 bool blocked_by_policy); |
| 359 void OnGeolocationPermissionSet(const GURL& requesting_frame, | 362 void OnGeolocationPermissionSet(const GURL& requesting_frame, |
| 360 bool allowed); | 363 bool allowed); |
| 361 void OnDidUseKeygen(const GURL& url); | 364 void OnDidUseKeygen(const GURL& url); |
| 362 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 365 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 363 void OnProtectedMediaIdentifierPermissionSet(const GURL& requesting_frame, | 366 void OnProtectedMediaIdentifierPermissionSet(const GURL& requesting_frame, |
| 364 bool allowed); | 367 bool allowed); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 // Holds the previous committed url during a navigation. | 494 // Holds the previous committed url during a navigation. |
| 492 GURL previous_url_; | 495 GURL previous_url_; |
| 493 | 496 |
| 494 // Observer to watch for content settings changed. | 497 // Observer to watch for content settings changed. |
| 495 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 498 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
| 496 | 499 |
| 497 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 500 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
| 498 }; | 501 }; |
| 499 | 502 |
| 500 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 503 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
| OLD | NEW |