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

Side by Side Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 2590793004: MD Downloads: gzip vulcanized resources via compress="gzip" (Closed)
Patch Set: . Created 3 years, 12 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 "content/browser/gpu/gpu_internals_ui.h" 5 #include "content/browser/gpu/gpu_internals_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 namespace content { 58 namespace content {
59 namespace { 59 namespace {
60 60
61 WebUIDataSource* CreateGpuHTMLSource() { 61 WebUIDataSource* CreateGpuHTMLSource() {
62 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost); 62 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost);
63 63
64 source->SetJsonPath("strings.js"); 64 source->SetJsonPath("strings.js");
65 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); 65 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS);
66 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML); 66 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML);
67 source->DisableI18nAndUseGzipForAllPaths(); 67 source->UseGzip(std::unordered_set<std::string>());
68 return source; 68 return source;
69 } 69 }
70 70
71 std::unique_ptr<base::DictionaryValue> NewDescriptionValuePair( 71 std::unique_ptr<base::DictionaryValue> NewDescriptionValuePair(
72 const std::string& desc, 72 const std::string& desc,
73 const std::string& value) { 73 const std::string& value) {
74 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 74 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
75 dict->SetString("description", desc); 75 dict->SetString("description", desc);
76 dict->SetString("value", value); 76 dict->SetString("value", value);
77 return dict; 77 return dict;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 : WebUIController(web_ui) { 559 : WebUIController(web_ui) {
560 web_ui->AddMessageHandler(new GpuMessageHandler()); 560 web_ui->AddMessageHandler(new GpuMessageHandler());
561 561
562 // Set up the chrome://gpu/ source. 562 // Set up the chrome://gpu/ source.
563 BrowserContext* browser_context = 563 BrowserContext* browser_context =
564 web_ui->GetWebContents()->GetBrowserContext(); 564 web_ui->GetWebContents()->GetBrowserContext();
565 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 565 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
566 } 566 }
567 567
568 } // namespace content 568 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_internals_ui.cc ('k') | content/browser/indexed_db/indexed_db_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698