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

Side by Side Diff: chrome/browser/ui/webui/signin_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/signin_internals_ui.h" 5 #include "chrome/browser/ui/webui/signin_internals_ui.h"
6 6
7 #include "base/hash.h" 7 #include "base/hash.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/about_signin_internals_factory.h" 9 #include "chrome/browser/signin/about_signin_internals_factory.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
11 #include "components/signin/core/browser/about_signin_internals.h" 11 #include "components/signin/core/browser/about_signin_internals.h"
12 #include "content/public/browser/web_ui.h" 12 #include "content/public/browser/web_ui.h"
13 #include "content/public/browser/web_ui_data_source.h" 13 #include "content/public/browser/web_ui_data_source.h"
14 #include "grit/signin_internals_resources.h" 14 #include "grit/signin_internals_resources.h"
15 15
16 namespace { 16 namespace {
17 17
18 content::WebUIDataSource* CreateSignInInternalsHTMLSource() { 18 content::WebUIDataSource* CreateSignInInternalsHTMLSource() {
19 content::WebUIDataSource* source = 19 content::WebUIDataSource* source =
20 content::WebUIDataSource::Create(chrome::kChromeUISignInInternalsHost); 20 content::WebUIDataSource::Create(chrome::kChromeUISignInInternalsHost);
21 21
22 source->SetUseJsonJSFormatV2();
22 source->SetJsonPath("strings.js"); 23 source->SetJsonPath("strings.js");
23 source->AddResourcePath("signin_internals.js", 24 source->AddResourcePath("signin_internals.js", IDR_SIGNIN_INTERNALS_INDEX_JS);
24 IDR_SIGNIN_INTERNALS_INDEX_JS);
25 source->SetDefaultResource(IDR_SIGNIN_INTERNALS_INDEX_HTML); 25 source->SetDefaultResource(IDR_SIGNIN_INTERNALS_INDEX_HTML);
26 return source; 26 return source;
27 } 27 }
28 28
29 } // namespace 29 } // namespace
30 30
31 SignInInternalsUI::SignInInternalsUI(content::WebUI* web_ui) 31 SignInInternalsUI::SignInInternalsUI(content::WebUI* web_ui)
32 : WebUIController(web_ui) { 32 : WebUIController(web_ui) {
33 Profile* profile = Profile::FromWebUI(web_ui); 33 Profile* profile = Profile::FromWebUI(web_ui);
34 content::WebUIDataSource::Add(profile, CreateSignInInternalsHTMLSource()); 34 content::WebUIDataSource::Add(profile, CreateSignInInternalsHTMLSource());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 scoped_ptr<base::DictionaryValue> info) { 82 scoped_ptr<base::DictionaryValue> info) {
83 web_ui()->CallJavascriptFunction( 83 web_ui()->CallJavascriptFunction(
84 "chrome.signin.onSigninInfoChanged.fire", *info); 84 "chrome.signin.onSigninInfoChanged.fire", *info);
85 } 85 }
86 86
87 void SignInInternalsUI::OnCookieAccountsFetched( 87 void SignInInternalsUI::OnCookieAccountsFetched(
88 scoped_ptr<base::DictionaryValue> info) { 88 scoped_ptr<base::DictionaryValue> info) {
89 web_ui()->CallJavascriptFunction( 89 web_ui()->CallJavascriptFunction(
90 "chrome.signin.onCookieAccountsFetched.fire", *info); 90 "chrome.signin.onCookieAccountsFetched.fire", *info);
91 } 91 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698