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

Side by Side Diff: chrome/browser/ui/webui/quota_internals/quota_internals_ui.cc

Issue 586953002: get rid of almost all old fashioned i18nTemplates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: window dot Created 6 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/quota_internals/quota_internals_ui.h" 5 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/quota_internals/quota_internals_handler.h" 10 #include "chrome/browser/ui/webui/quota_internals/quota_internals_handler.h"
11 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_ui.h" 13 #include "content/public/browser/web_ui.h"
14 #include "content/public/browser/web_ui_data_source.h" 14 #include "content/public/browser/web_ui_data_source.h"
15 #include "grit/quota_internals_resources.h" 15 #include "grit/quota_internals_resources.h"
16 16
17 using content::WebContents; 17 using content::WebContents;
18 18
19 namespace { 19 namespace {
20 20
21 content::WebUIDataSource* CreateQuotaInternalsHTMLSource() { 21 content::WebUIDataSource* CreateQuotaInternalsHTMLSource() {
22 content::WebUIDataSource* source = 22 content::WebUIDataSource* source =
23 content::WebUIDataSource::Create(chrome::kChromeUIQuotaInternalsHost); 23 content::WebUIDataSource::Create(chrome::kChromeUIQuotaInternalsHost);
24 24
25 source->SetUseJsonJSFormatV2();
25 source->SetJsonPath("strings.js"); 26 source->SetJsonPath("strings.js");
26 source->AddResourcePath( 27 source->AddResourcePath(
27 "event_handler.js", IDR_QUOTA_INTERNALS_EVENT_HANDLER_JS); 28 "event_handler.js", IDR_QUOTA_INTERNALS_EVENT_HANDLER_JS);
28 source->AddResourcePath( 29 source->AddResourcePath(
29 "message_dispatcher.js", IDR_QUOTA_INTERNALS_MESSAGE_DISPATCHER_JS); 30 "message_dispatcher.js", IDR_QUOTA_INTERNALS_MESSAGE_DISPATCHER_JS);
30 source->SetDefaultResource(IDR_QUOTA_INTERNALS_MAIN_HTML); 31 source->SetDefaultResource(IDR_QUOTA_INTERNALS_MAIN_HTML);
31 return source; 32 return source;
32 } 33 }
33 34
34 } // namespace 35 } // namespace
35 36
36 QuotaInternalsUI::QuotaInternalsUI(content::WebUI* web_ui) 37 QuotaInternalsUI::QuotaInternalsUI(content::WebUI* web_ui)
37 : WebUIController(web_ui) { 38 : WebUIController(web_ui) {
38 web_ui->AddMessageHandler(new quota_internals::QuotaInternalsHandler); 39 web_ui->AddMessageHandler(new quota_internals::QuotaInternalsHandler);
39 Profile* profile = Profile::FromWebUI(web_ui); 40 Profile* profile = Profile::FromWebUI(web_ui);
40 content::WebUIDataSource::Add(profile, CreateQuotaInternalsHTMLSource()); 41 content::WebUIDataSource::Add(profile, CreateQuotaInternalsHTMLSource());
41 } 42 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc ('k') | chrome/browser/ui/webui/set_as_default_browser_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698