| 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/in_process_webkit/indexed_db_dispatcher_host.h" | 5 #include "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
| 10 #include "chrome/browser/host_content_settings_map.h" | 10 #include "chrome/browser/host_content_settings_map.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 GURL host(string16(WebSecurityOrigin::createFromDatabaseIdentifier( | 268 GURL host(string16(WebSecurityOrigin::createFromDatabaseIdentifier( |
| 269 params.origin_).toString())); | 269 params.origin_).toString())); |
| 270 | 270 |
| 271 ContentSetting content_setting = | 271 ContentSetting content_setting = |
| 272 host_content_settings_map_->GetContentSetting( | 272 host_content_settings_map_->GetContentSetting( |
| 273 host, CONTENT_SETTINGS_TYPE_COOKIES, ""); | 273 host, CONTENT_SETTINGS_TYPE_COOKIES, ""); |
| 274 | 274 |
| 275 CallRenderViewHostContentSettingsDelegate( | 275 CallRenderViewHostContentSettingsDelegate( |
| 276 process_id_, params.routing_id_, | 276 process_id_, params.routing_id_, |
| 277 &RenderViewHostDelegate::ContentSettings::OnIndexedDBAccessed, | 277 &RenderViewHostDelegate::ContentSettings::OnIndexedDBAccessed, |
| 278 host, params.name_, params.description_, | 278 host, params.description_, content_setting == CONTENT_SETTING_BLOCK); |
| 279 content_setting == CONTENT_SETTING_BLOCK); | |
| 280 | 279 |
| 281 if (content_setting == CONTENT_SETTING_BLOCK) { | 280 if (content_setting == CONTENT_SETTING_BLOCK) { |
| 282 // TODO(jorlow): Change this to the proper error code once we figure out | 281 // TODO(jorlow): Change this to the proper error code once we figure out |
| 283 // one. | 282 // one. |
| 284 int error_code = 0; // Defined by the IndexedDB spec. | 283 int error_code = 0; // Defined by the IndexedDB spec. |
| 285 static string16 error_message = ASCIIToUTF16( | 284 static string16 error_message = ASCIIToUTF16( |
| 286 "The user denied permission to open the database."); | 285 "The user denied permission to open the database."); |
| 287 Send(new ViewMsg_IDBCallbacksError(params.response_id_, error_code, | 286 Send(new ViewMsg_IDBCallbacksError(params.response_id_, error_code, |
| 288 error_message)); | 287 error_message)); |
| 289 return; | 288 return; |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 return; | 1150 return; |
| 1152 | 1151 |
| 1153 idb_transaction->didCompleteTaskEvents(); | 1152 idb_transaction->didCompleteTaskEvents(); |
| 1154 } | 1153 } |
| 1155 | 1154 |
| 1156 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 1155 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
| 1157 int32 object_id) { | 1156 int32 object_id) { |
| 1158 parent_->DestroyObject( | 1157 parent_->DestroyObject( |
| 1159 &map_, object_id, ViewHostMsg_IDBTransactionDestroyed::ID); | 1158 &map_, object_id, ViewHostMsg_IDBTransactionDestroyed::ID); |
| 1160 } | 1159 } |
| OLD | NEW |