From 27018cea56f6f1b3521975657acedbd20206c31a Mon Sep 17 00:00:00 2001 From: sagarmittal Date: Tue, 9 Dec 2014 19:51:15 -0800 Subject: [PATCH] IDB: Show blob path on chrome://indexeddb-internals R=cmumford@chromium.org,jsbell@chromium.org BUG=409436 Review URL: https://codereview.chromium.org/791443002 Cr-Commit-Position: refs/heads/master@{#307635} --- content/browser/indexed_db/indexed_db_context_impl.cc | 8 ++++++-- content/browser/resources/indexed_db/indexeddb_internals.css | 5 +++++ content/browser/resources/indexed_db/indexeddb_internals.html | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc index 66b9cc77dda9..c7e13263677b 100644 --- a/content/browser/indexed_db/indexed_db_context_impl.cc +++ b/content/browser/indexed_db/indexed_db_context_impl.cc @@ -170,8 +170,12 @@ base::ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { info->SetString("size", ui::FormatBytes(GetOriginDiskUsage(origin_url))); info->SetDouble("last_modified", GetOriginLastModified(origin_url).ToJsTime()); - if (!is_incognito()) - info->SetString("path", GetLevelDBPath(origin_url).value()); + if (!is_incognito()) { + scoped_ptr paths(new base::ListValue()); + for (const base::FilePath& path : GetStoragePaths(origin_url)) + paths->AppendString(path.value()); + info->Set("paths", paths.release()); + } info->SetDouble("connection_count", GetConnectionCount(origin_url)); // This ends up being O(n^2) since we iterate over all open databases diff --git a/content/browser/resources/indexed_db/indexeddb_internals.css b/content/browser/resources/indexed_db/indexeddb_internals.css index 774938b32011..232796a9759f 100644 --- a/content/browser/resources/indexed_db/indexeddb_internals.css +++ b/content/browser/resources/indexed_db/indexeddb_internals.css @@ -48,6 +48,11 @@ font-weight: bold; } +.indexeddb-path { + display: block; + margin-left: 1em; +} + .indexeddb-transaction-list { margin-left: 10px; border-collapse: collapse; diff --git a/content/browser/resources/indexed_db/indexeddb_internals.html b/content/browser/resources/indexed_db/indexeddb_internals.html index f389e9fbc89b..127730201a17 100644 --- a/content/browser/resources/indexed_db/indexeddb_internals.html +++ b/content/browser/resources/indexed_db/indexeddb_internals.html @@ -39,9 +39,9 @@ jsvalues=".idb_origin_url:url;.idb_partition_path:$partition_path" jscontent="connection_count"> -
- Path: - +
+ Paths: +