OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |