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

Side by Side Diff: content/browser/service_worker/foreign_fetch_request_handler.h

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ServiceWorkerContextCore::DidFindRegistrationForCheckHasServiceWorker() Created 4 years, 5 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ResourceType resource_type, 89 ResourceType resource_type,
90 RequestContextType request_context_type, 90 RequestContextType request_context_type,
91 RequestContextFrameType frame_type, 91 RequestContextFrameType frame_type,
92 scoped_refptr<ResourceRequestBodyImpl> body); 92 scoped_refptr<ResourceRequestBodyImpl> body);
93 93
94 // Called when a ServiceWorkerRegistration has (or hasn't) been found for the 94 // Called when a ServiceWorkerRegistration has (or hasn't) been found for the
95 // request being handled. 95 // request being handled.
96 void DidFindRegistration( 96 void DidFindRegistration(
97 const base::WeakPtr<ServiceWorkerURLRequestJob>& job, 97 const base::WeakPtr<ServiceWorkerURLRequestJob>& job,
98 ServiceWorkerStatusCode status, 98 ServiceWorkerStatusCode status,
99 const scoped_refptr<ServiceWorkerRegistration>& registration); 99 scoped_refptr<ServiceWorkerRegistration> registration);
100 100
101 // ServiceWorkerURLRequestJob::Delegate implementation: 101 // ServiceWorkerURLRequestJob::Delegate implementation:
102 void OnPrepareToRestart() override; 102 void OnPrepareToRestart() override;
103 ServiceWorkerVersion* GetServiceWorkerVersion( 103 ServiceWorkerVersion* GetServiceWorkerVersion(
104 ServiceWorkerMetrics::URLRequestJobResult* result) override; 104 ServiceWorkerMetrics::URLRequestJobResult* result) override;
105 105
106 // Sets |job_| to nullptr, and clears all extra response info associated with 106 // Sets |job_| to nullptr, and clears all extra response info associated with
107 // that job. 107 // that job.
108 void ClearJob(); 108 void ClearJob();
109 109
(...skipping 15 matching lines...) Expand all
125 bool use_network_ = false; 125 bool use_network_ = false;
126 126
127 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; 127 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); 129 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler);
130 }; 130 };
131 131
132 } // namespace content 132 } // namespace content
133 133
134 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ 134 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698