| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_contents/tab_specific_content_settings.h" | 5 #include "chrome/browser/tab_contents/tab_specific_content_settings.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/browsing_data_appcache_helper.h" | 8 #include "chrome/browser/browsing_data_appcache_helper.h" |
| 9 #include "chrome/browser/browsing_data_database_helper.h" | 9 #include "chrome/browser/browsing_data_database_helper.h" |
| 10 #include "chrome/browser/browsing_data_indexed_db_helper.h" | 10 #include "chrome/browser/browsing_data_indexed_db_helper.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); | 103 OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); |
| 104 } else { | 104 } else { |
| 105 allowed_local_shared_objects_.cookies()->SetCookieWithOptions( | 105 allowed_local_shared_objects_.cookies()->SetCookieWithOptions( |
| 106 url, cookie_line, options); | 106 url, cookie_line, options); |
| 107 OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES); | 107 OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 void TabSpecificContentSettings::OnIndexedDBAccessed( | 111 void TabSpecificContentSettings::OnIndexedDBAccessed( |
| 112 const GURL& url, | 112 const GURL& url, |
| 113 const string16& name, | |
| 114 const string16& description, | 113 const string16& description, |
| 115 bool blocked_by_policy) { | 114 bool blocked_by_policy) { |
| 116 if (blocked_by_policy) { | 115 if (blocked_by_policy) { |
| 117 blocked_local_shared_objects_.indexed_dbs()->AddIndexedDB( | 116 blocked_local_shared_objects_.indexed_dbs()->AddIndexedDB( |
| 118 url, name, description); | 117 url, description); |
| 119 OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); | 118 OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string()); |
| 120 }else { | 119 }else { |
| 121 allowed_local_shared_objects_.indexed_dbs()->AddIndexedDB( | 120 allowed_local_shared_objects_.indexed_dbs()->AddIndexedDB( |
| 122 url, name, description); | 121 url, description); |
| 123 OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES); | 122 OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES); |
| 124 } | 123 } |
| 125 } | 124 } |
| 126 | 125 |
| 127 void TabSpecificContentSettings::OnLocalStorageAccessed( | 126 void TabSpecificContentSettings::OnLocalStorageAccessed( |
| 128 const GURL& url, | 127 const GURL& url, |
| 129 DOMStorageType storage_type, | 128 DOMStorageType storage_type, |
| 130 bool blocked_by_policy) { | 129 bool blocked_by_policy) { |
| 131 LocalSharedObjectsContainer& container = blocked_by_policy ? | 130 LocalSharedObjectsContainer& container = blocked_by_policy ? |
| 132 blocked_local_shared_objects_ : allowed_local_shared_objects_; | 131 blocked_local_shared_objects_ : allowed_local_shared_objects_; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 259 |
| 261 CookiesTreeModel* | 260 CookiesTreeModel* |
| 262 TabSpecificContentSettings::LocalSharedObjectsContainer::GetCookiesTreeModel() { | 261 TabSpecificContentSettings::LocalSharedObjectsContainer::GetCookiesTreeModel() { |
| 263 return new CookiesTreeModel(cookies_, | 262 return new CookiesTreeModel(cookies_, |
| 264 databases_, | 263 databases_, |
| 265 local_storages_, | 264 local_storages_, |
| 266 session_storages_, | 265 session_storages_, |
| 267 appcaches_, | 266 appcaches_, |
| 268 indexed_dbs_); | 267 indexed_dbs_); |
| 269 } | 268 } |
| OLD | NEW |