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

Side by Side Diff: content/browser/service_worker/service_worker_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/service_worker/service_worker_internals_ui.h" 5 #include "content/browser/service_worker/service_worker_internals_ui.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 : WebUIController(web_ui), next_partition_id_(0) { 330 : WebUIController(web_ui), next_partition_id_(0) {
331 WebUIDataSource* source = 331 WebUIDataSource* source =
332 WebUIDataSource::Create(kChromeUIServiceWorkerInternalsHost); 332 WebUIDataSource::Create(kChromeUIServiceWorkerInternalsHost);
333 source->SetJsonPath("strings.js"); 333 source->SetJsonPath("strings.js");
334 source->AddResourcePath("serviceworker_internals.js", 334 source->AddResourcePath("serviceworker_internals.js",
335 IDR_SERVICE_WORKER_INTERNALS_JS); 335 IDR_SERVICE_WORKER_INTERNALS_JS);
336 source->AddResourcePath("serviceworker_internals.css", 336 source->AddResourcePath("serviceworker_internals.css",
337 IDR_SERVICE_WORKER_INTERNALS_CSS); 337 IDR_SERVICE_WORKER_INTERNALS_CSS);
338 source->SetDefaultResource(IDR_SERVICE_WORKER_INTERNALS_HTML); 338 source->SetDefaultResource(IDR_SERVICE_WORKER_INTERNALS_HTML);
339 source->DisableDenyXFrameOptions(); 339 source->DisableDenyXFrameOptions();
340 source->DisableI18nAndUseGzipForAllPaths();
340 341
341 BrowserContext* browser_context = 342 BrowserContext* browser_context =
342 web_ui->GetWebContents()->GetBrowserContext(); 343 web_ui->GetWebContents()->GetBrowserContext();
343 WebUIDataSource::Add(browser_context, source); 344 WebUIDataSource::Add(browser_context, source);
344 345
345 web_ui->RegisterMessageCallback( 346 web_ui->RegisterMessageCallback(
346 "GetOptions", 347 "GetOptions",
347 base::Bind(&ServiceWorkerInternalsUI::GetOptions, 348 base::Bind(&ServiceWorkerInternalsUI::GetOptions,
348 base::Unretained(this))); 349 base::Unretained(this)));
349 web_ui->RegisterMessageCallback( 350 web_ui->RegisterMessageCallback(
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 callback.Run(SERVICE_WORKER_ERROR_ABORT); 590 callback.Run(SERVICE_WORKER_ERROR_ABORT);
590 return; 591 return;
591 } 592 }
592 593
593 // ServiceWorkerContextWrapper::UnregisterServiceWorker doesn't work here 594 // ServiceWorkerContextWrapper::UnregisterServiceWorker doesn't work here
594 // because that reduces a status code to boolean. 595 // because that reduces a status code to boolean.
595 context->context()->UnregisterServiceWorker(scope, callback); 596 context->context()->UnregisterServiceWorker(scope, callback);
596 } 597 }
597 598
598 } // namespace content 599 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_internals_ui.cc ('k') | content/browser/webrtc/webrtc_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698