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

Side by Side Diff: content/browser/appcache/appcache_internals_ui.cc

Issue 2149323003: Change the way that gzipped resources are loaded from resources.pak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/appcache/appcache_internals_ui.h" 5 #include "content/browser/appcache/appcache_internals_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 kRequestGetFileDetails, 344 kRequestGetFileDetails,
345 base::Bind(&AppCacheInternalsUI::GetFileDetails, AsWeakPtr())); 345 base::Bind(&AppCacheInternalsUI::GetFileDetails, AsWeakPtr()));
346 346
347 WebUIDataSource* source = 347 WebUIDataSource* source =
348 WebUIDataSource::Create(kChromeUIAppCacheInternalsHost); 348 WebUIDataSource::Create(kChromeUIAppCacheInternalsHost);
349 349
350 source->SetJsonPath("strings.js"); 350 source->SetJsonPath("strings.js");
351 source->AddResourcePath("appcache_internals.js", IDR_APPCACHE_INTERNALS_JS); 351 source->AddResourcePath("appcache_internals.js", IDR_APPCACHE_INTERNALS_JS);
352 source->AddResourcePath("appcache_internals.css", IDR_APPCACHE_INTERNALS_CSS); 352 source->AddResourcePath("appcache_internals.css", IDR_APPCACHE_INTERNALS_CSS);
353 source->SetDefaultResource(IDR_APPCACHE_INTERNALS_HTML); 353 source->SetDefaultResource(IDR_APPCACHE_INTERNALS_HTML);
354 source->DisableI18nAndUseGzipForAllPaths();
354 355
355 WebUIDataSource::Add(browser_context(), source); 356 WebUIDataSource::Add(browser_context(), source);
356 357
357 BrowserContext::StoragePartitionCallback callback = 358 BrowserContext::StoragePartitionCallback callback =
358 base::Bind(&AppCacheInternalsUI::CreateProxyForPartition, AsWeakPtr()); 359 base::Bind(&AppCacheInternalsUI::CreateProxyForPartition, AsWeakPtr());
359 BrowserContext::ForEachStoragePartition(browser_context(), callback); 360 BrowserContext::ForEachStoragePartition(browser_context(), callback);
360 } 361 }
361 362
362 AppCacheInternalsUI::~AppCacheInternalsUI() { 363 AppCacheInternalsUI::~AppCacheInternalsUI() {
363 for (auto& proxy : appcache_proxies_) 364 for (auto& proxy : appcache_proxies_)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 const base::FilePath& partition_path) { 503 const base::FilePath& partition_path) {
503 for (const scoped_refptr<Proxy>& proxy : appcache_proxies_) { 504 for (const scoped_refptr<Proxy>& proxy : appcache_proxies_) {
504 if (proxy->partition_path_ == partition_path) 505 if (proxy->partition_path_ == partition_path)
505 return proxy.get(); 506 return proxy.get();
506 } 507 }
507 NOTREACHED(); 508 NOTREACHED();
508 return nullptr; 509 return nullptr;
509 } 510 }
510 511
511 } // namespace content 512 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc ('k') | content/browser/gpu/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698