| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "extensions/shell/browser/shell_special_storage_policy.h" | 5 #include "extensions/shell/browser/shell_special_storage_policy.h" |
| 6 | 6 |
| 7 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 ShellSpecialStoragePolicy::ShellSpecialStoragePolicy() { | 9 ShellSpecialStoragePolicy::ShellSpecialStoragePolicy() { |
| 10 } | 10 } |
| 11 | 11 |
| 12 ShellSpecialStoragePolicy::~ShellSpecialStoragePolicy() { | 12 ShellSpecialStoragePolicy::~ShellSpecialStoragePolicy() { |
| 13 } | 13 } |
| 14 | 14 |
| 15 bool ShellSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { | 15 bool ShellSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { |
| 16 return true; | 16 return true; |
| 17 } | 17 } |
| 18 | 18 |
| 19 bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { | 19 bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { |
| 20 return true; | 20 return true; |
| 21 } | 21 } |
| 22 | 22 |
| 23 bool ShellSpecialStoragePolicy::IsStorageDurable(const GURL& origin) { |
| 24 // The plan is to forbid extensions from acquiring the durable storage |
| 25 // permission because they can specify 'unlimitedStorage' in the manifest. |
| 26 return false; |
| 27 } |
| 28 |
| 23 bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { | 29 bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { |
| 24 return false; | 30 return false; |
| 25 } | 31 } |
| 26 | 32 |
| 27 bool ShellSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) { | 33 bool ShellSpecialStoragePolicy::CanQueryDiskSize(const GURL& origin) { |
| 28 return true; | 34 return true; |
| 29 } | 35 } |
| 30 | 36 |
| 31 bool ShellSpecialStoragePolicy::HasSessionOnlyOrigins() { | 37 bool ShellSpecialStoragePolicy::HasSessionOnlyOrigins() { |
| 32 return false; | 38 return false; |
| 33 } | 39 } |
| 34 | 40 |
| 35 bool ShellSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { | 41 bool ShellSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { |
| 36 return false; | 42 return false; |
| 37 } | 43 } |
| 38 | 44 |
| 39 } // namespace extensions | 45 } // namespace extensions |
| OLD | NEW |