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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_info_ui.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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/extensions/extension_info_ui.h" 5 #include "chrome/browser/ui/webui/extensions/extension_info_ui.h"
6 6
7 #include "base/i18n/time_formatting.h" 7 #include "base/i18n/time_formatting.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 17 matching lines...) Expand all
28 ExtensionInfoUI::ExtensionInfoUI(content::WebUI* web_ui, const GURL& url) 28 ExtensionInfoUI::ExtensionInfoUI(content::WebUI* web_ui, const GURL& url)
29 : content::WebUIController(web_ui), 29 : content::WebUIController(web_ui),
30 source_(content::WebUIDataSource::Create( 30 source_(content::WebUIDataSource::Create(
31 chrome::kChromeUIExtensionInfoHost)) { 31 chrome::kChromeUIExtensionInfoHost)) {
32 AddExtensionDataToSource(url.path().substr(1)); 32 AddExtensionDataToSource(url.path().substr(1));
33 33
34 source_->AddLocalizedString("isRunning", 34 source_->AddLocalizedString("isRunning",
35 IDS_EXTENSION_SCRIPT_POPUP_IS_RUNNING); 35 IDS_EXTENSION_SCRIPT_POPUP_IS_RUNNING);
36 source_->AddLocalizedString("lastUpdated", 36 source_->AddLocalizedString("lastUpdated",
37 IDS_EXTENSION_SCRIPT_POPUP_LAST_UPDATED); 37 IDS_EXTENSION_SCRIPT_POPUP_LAST_UPDATED);
38 source_->SetUseJsonJSFormatV2();
39 source_->SetJsonPath("strings.js"); 38 source_->SetJsonPath("strings.js");
40 39
41 source_->AddResourcePath("extension_info.css", IDR_EXTENSION_INFO_CSS); 40 source_->AddResourcePath("extension_info.css", IDR_EXTENSION_INFO_CSS);
42 source_->AddResourcePath("extension_info.js", IDR_EXTENSION_INFO_JS); 41 source_->AddResourcePath("extension_info.js", IDR_EXTENSION_INFO_JS);
43 source_->SetDefaultResource(IDR_EXTENSION_INFO_HTML); 42 source_->SetDefaultResource(IDR_EXTENSION_INFO_HTML);
44 43
45 Profile* profile = Profile::FromWebUI(web_ui); 44 Profile* profile = Profile::FromWebUI(web_ui);
46 content::WebUIDataSource::Add(profile, source_); 45 content::WebUIDataSource::Add(profile, source_);
47 } 46 }
48 47
(...skipping 27 matching lines...) Expand all
76 ExtensionIconSet::MATCH_BIGGER, 75 ExtensionIconSet::MATCH_BIGGER,
77 false, NULL); 76 false, NULL);
78 source_->AddString("icon", base::UTF8ToUTF16(icon.spec())); 77 source_->AddString("icon", base::UTF8ToUTF16(icon.spec()));
79 // Set the last update time (the install time). 78 // Set the last update time (the install time).
80 base::Time install_time = 79 base::Time install_time =
81 ExtensionPrefs::Get(profile)->GetInstallTime(extension_id); 80 ExtensionPrefs::Get(profile)->GetInstallTime(extension_id);
82 source_->AddString("installTime", base::TimeFormatShortDate(install_time)); 81 source_->AddString("installTime", base::TimeFormatShortDate(install_time));
83 } 82 }
84 83
85 } // namespace extensions 84 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui.cc ('k') | chrome/browser/ui/webui/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698