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

Side by Side Diff: content/browser/service_worker/service_worker_context_watcher.cc

Issue 1841863003: DevTools: move the force update SW on reload checkbox to the Resources / Service Workers view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixed Created 4 years, 8 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/service_worker/service_worker_context_watcher.h" 5 #include "content/browser/service_worker/service_worker_context_watcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 SendRegistrationInfo(registration_id, pattern, 274 SendRegistrationInfo(registration_id, pattern,
275 ServiceWorkerRegistrationInfo::IS_NOT_DELETED); 275 ServiceWorkerRegistrationInfo::IS_NOT_DELETED);
276 } 276 }
277 277
278 void ServiceWorkerContextWatcher::OnRegistrationDeleted(int64_t registration_id, 278 void ServiceWorkerContextWatcher::OnRegistrationDeleted(int64_t registration_id,
279 const GURL& pattern) { 279 const GURL& pattern) {
280 SendRegistrationInfo(registration_id, pattern, 280 SendRegistrationInfo(registration_id, pattern,
281 ServiceWorkerRegistrationInfo::IS_DELETED); 281 ServiceWorkerRegistrationInfo::IS_DELETED);
282 } 282 }
283 283
284 void ServiceWorkerContextWatcher::OnForceUpdateOnPageLoadChanged(
285 int64_t registration_id,
286 bool force_update_on_page_load) {
287 ServiceWorkerRegistration* registration =
288 context_->GetLiveRegistration(registration_id);
289 if (!registration)
290 return;
291 std::vector<ServiceWorkerRegistrationInfo> registrations;
292 registrations.push_back(registration->GetInfo());
293 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
294 base::Bind(registration_callback_, registrations));
295 }
296
297 } // namespace content 284 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698