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

Side by Side Diff: webkit/quota/special_storage_policy.h

Issue 6810037: File API changes needed for safely passing user selected file entities from the file browser comp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/fileapi/webkit_fileapi.gypi ('k') | webkit/tools/test_shell/simple_file_system.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_QUOTA_SPECIAL_STORAGE_POLICY_H_ 5 #ifndef WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
6 #define WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_ 6 #define WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
7 7
8 #include <string>
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 11
10 class GURL; 12 class GURL;
11 13
12 namespace quota { 14 namespace quota {
13 15
14 // Special rights are granted to 'extensions' and 'applications'. The 16 // Special rights are granted to 'extensions' and 'applications'. The
15 // storage subsystems query this interface to determine which origins 17 // storage subsystems query this interface to determine which origins
16 // have these rights. Chrome provides an impl that is cognizant of what 18 // have these rights. Chrome provides an impl that is cognizant of what
17 // is currently installed in the extensions system. 19 // is currently installed in the extensions system.
18 // An implementation must be thread-safe. 20 // An implementation must be thread-safe.
19 class SpecialStoragePolicy 21 class SpecialStoragePolicy
20 : public base::RefCountedThreadSafe<SpecialStoragePolicy> { 22 : public base::RefCountedThreadSafe<SpecialStoragePolicy> {
21 public: 23 public:
22 SpecialStoragePolicy(); 24 SpecialStoragePolicy();
23 25
24 // Protected storage is not subject to removal by the browsing data remover. 26 // Protected storage is not subject to removal by the browsing data remover.
25 virtual bool IsStorageProtected(const GURL& origin) = 0; 27 virtual bool IsStorageProtected(const GURL& origin) = 0;
26 28
27 // Unlimited storage is not subject to 'quotas'. 29 // Unlimited storage is not subject to 'quotas'.
28 virtual bool IsStorageUnlimited(const GURL& origin) = 0; 30 virtual bool IsStorageUnlimited(const GURL& origin) = 0;
29 31
30 // Local file system access allowed via File API. 32 // Checks if extension identified with |extension_id| is registered as
31 virtual bool IsLocalFileSystemAccessAllowed(const GURL& origin) = 0; 33 // file handler.
34 virtual bool IsFileHandler(const std::string& extension_id) = 0;
32 35
33 protected: 36 protected:
34 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>; 37 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
35 virtual ~SpecialStoragePolicy(); 38 virtual ~SpecialStoragePolicy();
36 }; 39 };
37 40
38 } // namespace quota 41 } // namespace quota
39 42
40 #endif // WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_ 43 #endif // WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/webkit_fileapi.gypi ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698