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

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

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (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
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 "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 class FilePath;
10 class GURL; 11 class GURL;
11 12
12 namespace quota { 13 namespace quota {
13 14
14 // Special rights are granted to 'extensions' and 'applications'. The 15 // Special rights are granted to 'extensions' and 'applications'. The
15 // storage subsystems query this interface to determine which origins 16 // storage subsystems query this interface to determine which origins
16 // have these rights. Chrome provides an impl that is cognizant of what 17 // have these rights. Chrome provides an impl that is cognizant of what
17 // is currently installed in the extensions system. 18 // is currently installed in the extensions system.
18 // An implementation must be thread-safe. 19 // An implementation must be thread-safe.
19 class SpecialStoragePolicy 20 class SpecialStoragePolicy
20 : public base::RefCountedThreadSafe<SpecialStoragePolicy> { 21 : public base::RefCountedThreadSafe<SpecialStoragePolicy> {
21 public: 22 public:
22 SpecialStoragePolicy(); 23 SpecialStoragePolicy();
23 24
24 // Protected storage is not subject to removal by the browsing data remover. 25 // Protected storage is not subject to removal by the browsing data remover.
25 virtual bool IsStorageProtected(const GURL& origin) = 0; 26 virtual bool IsStorageProtected(const GURL& origin) = 0;
26 27
27 // Unlimited storage is not subject to 'quotas'. 28 // Unlimited storage is not subject to 'quotas'.
28 virtual bool IsStorageUnlimited(const GURL& origin) = 0; 29 virtual bool IsStorageUnlimited(const GURL& origin) = 0;
29 30
30 // Local file system access allowed via File API. 31 // Checks if local file system access to |virtual_path| from File API is
31 virtual bool IsLocalFileSystemAccessAllowed(const GURL& origin) = 0; 32 // allowed from |origin|.
33 virtual bool IsLocalFileSystemAccessAllowed(const GURL& origin,
34 const FilePath& virtual_path) = 0;
35
36 // Grants local file system access to |virtual_path| from |origin|.
37 virtual void GrantLocalFileSystemAccess(const GURL& origin,
38 const FilePath& virtual_path) = 0;
32 39
33 protected: 40 protected:
34 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>; 41 friend class base::RefCountedThreadSafe<SpecialStoragePolicy>;
35 virtual ~SpecialStoragePolicy(); 42 virtual ~SpecialStoragePolicy();
36 }; 43 };
37 44
38 } // namespace quota 45 } // namespace quota
39 46
40 #endif // WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_ 47 #endif // WEBKIT_QUOTA_SPECIAL_STORAGE_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698