OLD | NEW |
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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/hash.h" | 10 #include "base/hash.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 content::WebUIDataSource* CreateSignInInternalsHTMLSource() { | 24 content::WebUIDataSource* CreateSignInInternalsHTMLSource() { |
25 content::WebUIDataSource* source = | 25 content::WebUIDataSource* source = |
26 content::WebUIDataSource::Create(chrome::kChromeUISignInInternalsHost); | 26 content::WebUIDataSource::Create(chrome::kChromeUISignInInternalsHost); |
27 | 27 |
28 source->SetJsonPath("strings.js"); | 28 source->SetJsonPath("strings.js"); |
29 source->AddResourcePath("signin_internals.js", IDR_SIGNIN_INTERNALS_INDEX_JS); | 29 source->AddResourcePath("signin_internals.js", IDR_SIGNIN_INTERNALS_INDEX_JS); |
30 source->SetDefaultResource(IDR_SIGNIN_INTERNALS_INDEX_HTML); | 30 source->SetDefaultResource(IDR_SIGNIN_INTERNALS_INDEX_HTML); |
| 31 source->DisableI18nAndUseGzipForAllPaths(); |
31 return source; | 32 return source; |
32 } | 33 } |
33 | 34 |
34 } // namespace | 35 } // namespace |
35 | 36 |
36 SignInInternalsUI::SignInInternalsUI(content::WebUI* web_ui) | 37 SignInInternalsUI::SignInInternalsUI(content::WebUI* web_ui) |
37 : WebUIController(web_ui) { | 38 : WebUIController(web_ui) { |
38 Profile* profile = Profile::FromWebUI(web_ui); | 39 Profile* profile = Profile::FromWebUI(web_ui); |
39 content::WebUIDataSource::Add(profile, CreateSignInInternalsHTMLSource()); | 40 content::WebUIDataSource::Add(profile, CreateSignInInternalsHTMLSource()); |
40 if (profile) { | 41 if (profile) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 106 |
106 web_ui()->CallJavascriptFunctionUnsafe( | 107 web_ui()->CallJavascriptFunctionUnsafe( |
107 "chrome.signin.onSigninInfoChanged.fire", *info); | 108 "chrome.signin.onSigninInfoChanged.fire", *info); |
108 } | 109 } |
109 | 110 |
110 void SignInInternalsUI::OnCookieAccountsFetched( | 111 void SignInInternalsUI::OnCookieAccountsFetched( |
111 const base::DictionaryValue* info) { | 112 const base::DictionaryValue* info) { |
112 web_ui()->CallJavascriptFunctionUnsafe( | 113 web_ui()->CallJavascriptFunctionUnsafe( |
113 "chrome.signin.onCookieAccountsFetched.fire", *info); | 114 "chrome.signin.onCookieAccountsFetched.fire", *info); |
114 } | 115 } |
OLD | NEW |