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

Side by Side Diff: webkit/appcache/appcache_policy.h

Issue 7720022: Third-party appcache blocking. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_host_unittest.cc ('k') | webkit/appcache/appcache_request_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 WEBKIT_APPCACHE_APPCACHE_POLICY_H_ 5 #ifndef WEBKIT_APPCACHE_APPCACHE_POLICY_H_
6 #define WEBKIT_APPCACHE_APPCACHE_POLICY_H_ 6 #define WEBKIT_APPCACHE_APPCACHE_POLICY_H_
7 7
8 #include "net/base/completion_callback.h"
9
10 class GURL; 8 class GURL;
11 9
12 namespace appcache { 10 namespace appcache {
13 11
14 class AppCachePolicy { 12 class AppCachePolicy {
15 public: 13 public:
16 AppCachePolicy() {} 14 AppCachePolicy() {}
17 15
18 // Called prior to loading a main resource from the appache. 16 // Called prior to loading a main resource from the appache.
19 // Returns true if allowed. This is expected to return immediately 17 // Returns true if allowed. This is expected to return immediately
20 // without any user prompt. 18 // without any user prompt.
21 virtual bool CanLoadAppCache(const GURL& manifest_url) = 0; 19 virtual bool CanLoadAppCache(const GURL& manifest_url,
20 const GURL& first_party) = 0;
22 21
23 // Called prior to creating a new appcache. 22 // Called prior to creating a new appcache. Returns true if allowed.
24 // Returns net::OK if allowed, net::ERR_ACCESS_DENIED if not allowed. 23 virtual bool CanCreateAppCache(const GURL& manifest_url,
25 // May also return net::ERR_IO_PENDING to indicate 24 const GURL& first_party) = 0;
26 // that the completion callback will be notified (asynchronously and on
27 // the current thread) of the final result. Note: The completion callback
28 // must remain valid until notified.
29 virtual int CanCreateAppCache(const GURL& manifest_url,
30 net::CompletionCallback* callback) = 0;
31 25
32 protected: 26 protected:
33 ~AppCachePolicy() {} 27 ~AppCachePolicy() {}
34 }; 28 };
35 29
36 } // namespace appcache 30 } // namespace appcache
37 31
38 #endif // WEBKIT_APPCACHE_APPCACHE_POLICY_H_ 32 #endif // WEBKIT_APPCACHE_APPCACHE_POLICY_H_
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_host_unittest.cc ('k') | webkit/appcache/appcache_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698