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

Side by Side Diff: content/public/browser/appcache_service.h

Issue 2642733002: Prerender: Disable prefetch if there's an appcache. (Closed)
Patch Set: Use appcache id rather than existence of tags in main resource Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_APPCACHE_SERVICE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_APPCACHE_SERVICE_H_
6 #define CONTENT_PUBLIC_BROWSER_APPCACHE_SERVICE_H_ 6 #define CONTENT_PUBLIC_BROWSER_APPCACHE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/common/appcache_info.h" 14 #include "content/public/common/appcache_info.h"
15 #include "net/base/completion_callback.h" 15 #include "net/base/completion_callback.h"
16 16
17 namespace net {
18 class URLRequest;
19 } // namespace net
20
17 namespace content { 21 namespace content {
18 22
19 // Refcounted container to avoid copying the collection in callbacks. 23 // Refcounted container to avoid copying the collection in callbacks.
20 struct CONTENT_EXPORT AppCacheInfoCollection 24 struct CONTENT_EXPORT AppCacheInfoCollection
21 : public base::RefCountedThreadSafe<AppCacheInfoCollection> { 25 : public base::RefCountedThreadSafe<AppCacheInfoCollection> {
22 AppCacheInfoCollection(); 26 AppCacheInfoCollection();
23 27
24 std::map<GURL, AppCacheInfoVector> infos_by_origin; 28 std::map<GURL, AppCacheInfoVector> infos_by_origin;
25 29
26 private: 30 private:
(...skipping 13 matching lines...) Expand all
40 const net::CompletionCallback& callback) = 0; 44 const net::CompletionCallback& callback) = 0;
41 45
42 // Deletes the group identified by 'manifest_url', 'callback' is 46 // Deletes the group identified by 'manifest_url', 'callback' is
43 // invoked upon completion. Upon completion, the cache group and 47 // invoked upon completion. Upon completion, the cache group and
44 // any resources within the group are no longer loadable and all 48 // any resources within the group are no longer loadable and all
45 // subresource loads for pages associated with a deleted group 49 // subresource loads for pages associated with a deleted group
46 // will fail. This method always completes asynchronously. 50 // will fail. This method always completes asynchronously.
47 virtual void DeleteAppCacheGroup(const GURL& manifest_url, 51 virtual void DeleteAppCacheGroup(const GURL& manifest_url,
48 const net::CompletionCallback& callback) = 0; 52 const net::CompletionCallback& callback) = 0;
49 53
54 static bool URLRequestHasActiveAppCache(const net::URLRequest* request);
droger 2017/02/07 10:40:38 Nit: the style guide recommends const reference.
mattcary 2017/02/07 11:28:46 Changed to nonconst * so that I don't have to chan
55
50 protected: 56 protected:
51 virtual ~AppCacheService() {} 57 virtual ~AppCacheService() {}
52 }; 58 };
53 59
54 } // namespace content 60 } // namespace content
55 61
56 #endif // CONTENT_PUBLIC_BROWSER_APPCACHE_SERVICE_H_ 62 #endif // CONTENT_PUBLIC_BROWSER_APPCACHE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698