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

Side by Side Diff: chrome/browser/ui/webui/signin_internals_ui.cc

Issue 2590793004: MD Downloads: gzip vulcanized resources via compress="gzip" (Closed)
Patch Set: . Created 4 years 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 <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
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 source->UseGzip(std::unordered_set<std::string>());
32 return source; 32 return source;
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 SignInInternalsUI::SignInInternalsUI(content::WebUI* web_ui) 37 SignInInternalsUI::SignInInternalsUI(content::WebUI* web_ui)
38 : WebUIController(web_ui) { 38 : WebUIController(web_ui) {
39 Profile* profile = Profile::FromWebUI(web_ui); 39 Profile* profile = Profile::FromWebUI(web_ui);
40 content::WebUIDataSource::Add(profile, CreateSignInInternalsHTMLSource()); 40 content::WebUIDataSource::Add(profile, CreateSignInInternalsHTMLSource());
41 if (profile) { 41 if (profile) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 web_ui()->CallJavascriptFunctionUnsafe( 107 web_ui()->CallJavascriptFunctionUnsafe(
108 "chrome.signin.onSigninInfoChanged.fire", *info); 108 "chrome.signin.onSigninInfoChanged.fire", *info);
109 } 109 }
110 110
111 void SignInInternalsUI::OnCookieAccountsFetched( 111 void SignInInternalsUI::OnCookieAccountsFetched(
112 const base::DictionaryValue* info) { 112 const base::DictionaryValue* info) {
113 web_ui()->CallJavascriptFunctionUnsafe( 113 web_ui()->CallJavascriptFunctionUnsafe(
114 "chrome.signin.onCookieAccountsFetched.fire", *info); 114 "chrome.signin.onCookieAccountsFetched.fire", *info);
115 } 115 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/profiler_ui.cc ('k') | chrome/browser/ui/webui/snippets_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698