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

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

Issue 1411953002: Store foreign fetch scopes in database with other SW information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@foreign-fetch-interface
Patch Set: address nhiroki's comments Created 5 years, 2 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
« no previous file with comments | « content/browser/service_worker/service_worker_storage_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SERVICE_WORKER_VERSION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 int64 version_id() const { return version_id_; } 136 int64 version_id() const { return version_id_; }
137 int64 registration_id() const { return registration_id_; } 137 int64 registration_id() const { return registration_id_; }
138 const GURL& script_url() const { return script_url_; } 138 const GURL& script_url() const { return script_url_; }
139 const GURL& scope() const { return scope_; } 139 const GURL& scope() const { return scope_; }
140 RunningStatus running_status() const { 140 RunningStatus running_status() const {
141 return static_cast<RunningStatus>(embedded_worker_->status()); 141 return static_cast<RunningStatus>(embedded_worker_->status());
142 } 142 }
143 ServiceWorkerVersionInfo GetInfo(); 143 ServiceWorkerVersionInfo GetInfo();
144 Status status() const { return status_; } 144 Status status() const { return status_; }
145 145
146 const std::vector<GURL>& foreign_fetch_scopes() const {
147 return foreign_fetch_scopes_;
148 }
149 void set_foreign_fetch_scopes(const std::vector<GURL>& scopes) {
150 foreign_fetch_scopes_ = scopes;
151 }
152
146 // This sets the new status and also run status change callbacks 153 // This sets the new status and also run status change callbacks
147 // if there're any (see RegisterStatusChangeCallback). 154 // if there're any (see RegisterStatusChangeCallback).
148 void SetStatus(Status status); 155 void SetStatus(Status status);
149 156
150 // Registers status change callback. (This is for one-off observation, 157 // Registers status change callback. (This is for one-off observation,
151 // the consumer needs to re-register if it wants to continue observing 158 // the consumer needs to re-register if it wants to continue observing
152 // status changes) 159 // status changes)
153 void RegisterStatusChangeCallback(const base::Closure& callback); 160 void RegisterStatusChangeCallback(const base::Closure& callback);
154 161
155 // Starts an embedded worker for this version. 162 // Starts an embedded worker for this version.
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 const bool should_exclude_from_uma_ = false; 655 const bool should_exclude_from_uma_ = false;
649 656
650 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 657 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
651 658
652 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 659 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
653 }; 660 };
654 661
655 } // namespace content 662 } // namespace content
656 663
657 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 664 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_storage_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698