OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/indexed_db/indexed_db_internals_ui.h" | 5 #include "content/browser/indexed_db/indexed_db_internals_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 base::Bind(&IndexedDBInternalsUI::OnForcedClose, base::Unretained(this), | 265 base::Bind(&IndexedDBInternalsUI::OnForcedClose, base::Unretained(this), |
266 partition_path, origin, connection_count)); | 266 partition_path, origin, connection_count)); |
267 } | 267 } |
268 | 268 |
269 void IndexedDBInternalsUI::OnForcedClose(const base::FilePath& partition_path, | 269 void IndexedDBInternalsUI::OnForcedClose(const base::FilePath& partition_path, |
270 const Origin& origin, | 270 const Origin& origin, |
271 size_t connection_count) { | 271 size_t connection_count) { |
272 web_ui()->CallJavascriptFunctionUnsafe( | 272 web_ui()->CallJavascriptFunctionUnsafe( |
273 "indexeddb.onForcedClose", base::StringValue(partition_path.value()), | 273 "indexeddb.onForcedClose", base::StringValue(partition_path.value()), |
274 base::StringValue(origin.Serialize()), | 274 base::StringValue(origin.Serialize()), |
275 base::FundamentalValue(static_cast<double>(connection_count))); | 275 base::Value(static_cast<double>(connection_count))); |
276 } | 276 } |
277 | 277 |
278 void IndexedDBInternalsUI::OnDownloadDataReady( | 278 void IndexedDBInternalsUI::OnDownloadDataReady( |
279 const base::FilePath& partition_path, | 279 const base::FilePath& partition_path, |
280 const Origin& origin, | 280 const Origin& origin, |
281 const base::FilePath temp_path, | 281 const base::FilePath temp_path, |
282 const base::FilePath zip_path, | 282 const base::FilePath zip_path, |
283 size_t connection_count) { | 283 size_t connection_count) { |
284 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 284 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
285 const GURL url = GURL(FILE_PATH_LITERAL("file://") + zip_path.value()); | 285 const GURL url = GURL(FILE_PATH_LITERAL("file://") + zip_path.value()); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 LOG(ERROR) << "Error downloading database dump: " | 354 LOG(ERROR) << "Error downloading database dump: " |
355 << DownloadInterruptReasonToString(interrupt_reason); | 355 << DownloadInterruptReasonToString(interrupt_reason); |
356 return; | 356 return; |
357 } | 357 } |
358 | 358 |
359 item->AddObserver(new FileDeleter(temp_path)); | 359 item->AddObserver(new FileDeleter(temp_path)); |
360 web_ui()->CallJavascriptFunctionUnsafe( | 360 web_ui()->CallJavascriptFunctionUnsafe( |
361 "indexeddb.onOriginDownloadReady", | 361 "indexeddb.onOriginDownloadReady", |
362 base::StringValue(partition_path.value()), | 362 base::StringValue(partition_path.value()), |
363 base::StringValue(origin.Serialize()), | 363 base::StringValue(origin.Serialize()), |
364 base::FundamentalValue(static_cast<double>(connection_count))); | 364 base::Value(static_cast<double>(connection_count))); |
365 } | 365 } |
366 | 366 |
367 } // namespace content | 367 } // namespace content |
OLD | NEW |