Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/browser/indexed_db/indexed_db_internals_ui.cc

Issue 13513004: content: Move more constants into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 10 matching lines...) Expand all
21 namespace content { 21 namespace content {
22 22
23 IndexedDBInternalsUI::IndexedDBInternalsUI(WebUI* web_ui) 23 IndexedDBInternalsUI::IndexedDBInternalsUI(WebUI* web_ui)
24 : WebUIController(web_ui) { 24 : WebUIController(web_ui) {
25 web_ui->RegisterMessageCallback( 25 web_ui->RegisterMessageCallback(
26 "getAllOrigins", 26 "getAllOrigins",
27 base::Bind(&IndexedDBInternalsUI::GetAllOrigins, 27 base::Bind(&IndexedDBInternalsUI::GetAllOrigins,
28 base::Unretained(this))); 28 base::Unretained(this)));
29 29
30 WebUIDataSource* source = 30 WebUIDataSource* source =
31 WebUIDataSource::Create(chrome::kChromeUIIndexedDBInternalsHost); 31 WebUIDataSource::Create(kChromeUIIndexedDBInternalsHost);
32 source->SetUseJsonJSFormatV2(); 32 source->SetUseJsonJSFormatV2();
33 source->SetJsonPath("strings.js"); 33 source->SetJsonPath("strings.js");
34 source->AddResourcePath("indexeddb_internals.js", 34 source->AddResourcePath("indexeddb_internals.js",
35 IDR_INDEXED_DB_INTERNALS_JS); 35 IDR_INDEXED_DB_INTERNALS_JS);
36 source->AddResourcePath("indexeddb_internals.css", 36 source->AddResourcePath("indexeddb_internals.css",
37 IDR_INDEXED_DB_INTERNALS_CSS); 37 IDR_INDEXED_DB_INTERNALS_CSS);
38 source->SetDefaultResource(IDR_INDEXED_DB_INTERNALS_HTML); 38 source->SetDefaultResource(IDR_INDEXED_DB_INTERNALS_HTML);
39 39
40 BrowserContext* browser_context = 40 BrowserContext* browser_context =
41 web_ui->GetWebContents()->GetBrowserContext(); 41 web_ui->GetWebContents()->GetBrowserContext();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 for (std::vector<IndexedDBInfo>::const_iterator iter = origins->begin(); 89 for (std::vector<IndexedDBInfo>::const_iterator iter = origins->begin();
90 iter != origins->end(); ++iter) { 90 iter != origins->end(); ++iter) {
91 base::DictionaryValue* info = new DictionaryValue; 91 base::DictionaryValue* info = new DictionaryValue;
92 info->SetString("url", iter->origin.spec()); 92 info->SetString("url", iter->origin.spec());
93 info->SetDouble("size", iter->size); 93 info->SetDouble("size", iter->size);
94 info->SetDouble("last_modified", iter->last_modified.ToJsTime()); 94 info->SetDouble("last_modified", iter->last_modified.ToJsTime());
95 urls.Append(info); 95 urls.Append(info);
96 } 96 }
97 web_ui()->CallJavascriptFunction("indexeddb.onOriginsReady", urls); 97 web_ui()->CallJavascriptFunction("indexeddb.onOriginsReady", urls);
98 } 98 }
99 } 99
100 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_browsertest.cc ('k') | content/browser/media/media_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698