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 3 // found in the LICENSE file. 4 5 #ifndef CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_USAGE_INFO_H_ 6 #define CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_USAGE_INFO_H_ 7 8 #include <vector> 9 10 #include "content/common/content_export.h" 11 #include "url/gurl.h" 12 13 namespace content { 14 15 // Used to report per-origin storage info for registered Service Workers. 16 class CONTENT_EXPORT ServiceWorkerUsageInfo { 17 public: 18 ServiceWorkerUsageInfo(const GURL& origin, const std::vector<GURL>& scopes); 19 ServiceWorkerUsageInfo(const GURL& origin); 20 ServiceWorkerUsageInfo(); 21 ~ServiceWorkerUsageInfo(); 22 23 // The origin this object is describing. 24 GURL origin; 25 26 // The set of all Service Worker registrations within this origin; 27 // a registration is a 'scope' - a URL with optional wildcard. 28 std::vector<GURL> scopes; 29 30 // TODO(jsbell): Add size on disk (in bytes). 31 // TODO(jsbell): Add last modified time. 32 }; 33 34 } // namespace content 35 36 #endif // CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_USAGE_INFO_H_ 37