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 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 13 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
14 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/download_manager.h" | 16 #include "content/public/browser/download_manager.h" |
17 #include "content/public/browser/download_url_parameters.h" | 17 #include "content/public/browser/download_url_parameters.h" |
18 #include "content/public/browser/storage_partition.h" | 18 #include "content/public/browser/storage_partition.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
21 #include "content/public/browser/web_ui_data_source.h" | 21 #include "content/public/browser/web_ui_data_source.h" |
22 #include "content/public/common/url_constants.h" | 22 #include "content/public/common/url_constants.h" |
23 #include "grit/content_resources.h" | 23 #include "grit/content_resources.h" |
24 #include "third_party/zlib/google/zip.h" | 24 #include "third_party/zlib/google/zip.h" |
25 #include "ui/base/text/bytes_formatting.h" | 25 #include "ui/base/text/bytes_formatting.h" |
26 #include "webkit/common/database/database_identifier.h" | 26 #include "storage/common/database/database_identifier.h" |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 IndexedDBInternalsUI::IndexedDBInternalsUI(WebUI* web_ui) | 30 IndexedDBInternalsUI::IndexedDBInternalsUI(WebUI* web_ui) |
31 : WebUIController(web_ui) { | 31 : WebUIController(web_ui) { |
32 web_ui->RegisterMessageCallback( | 32 web_ui->RegisterMessageCallback( |
33 "getAllOrigins", | 33 "getAllOrigins", |
34 base::Bind(&IndexedDBInternalsUI::GetAllOrigins, base::Unretained(this))); | 34 base::Bind(&IndexedDBInternalsUI::GetAllOrigins, base::Unretained(this))); |
35 | 35 |
36 web_ui->RegisterMessageCallback( | 36 web_ui->RegisterMessageCallback( |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 356 |
357 item->AddObserver(new FileDeleter(temp_path)); | 357 item->AddObserver(new FileDeleter(temp_path)); |
358 web_ui()->CallJavascriptFunction( | 358 web_ui()->CallJavascriptFunction( |
359 "indexeddb.onOriginDownloadReady", | 359 "indexeddb.onOriginDownloadReady", |
360 base::StringValue(partition_path.value()), | 360 base::StringValue(partition_path.value()), |
361 base::StringValue(origin_url.spec()), | 361 base::StringValue(origin_url.spec()), |
362 base::FundamentalValue(static_cast<double>(connection_count))); | 362 base::FundamentalValue(static_cast<double>(connection_count))); |
363 } | 363 } |
364 | 364 |
365 } // namespace content | 365 } // namespace content |
OLD | NEW |