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
3 // found in the LICENSE file.
4 
5 #include "extensions/shell/browser/shell_special_storage_policy.h"
6 
7 #include "base/bind.h"
8 #include "base/callback.h"
9 
10 namespace extensions {
11 
ShellSpecialStoragePolicy()12 ShellSpecialStoragePolicy::ShellSpecialStoragePolicy() {
13 }
14 
~ShellSpecialStoragePolicy()15 ShellSpecialStoragePolicy::~ShellSpecialStoragePolicy() {
16 }
17 
IsStorageProtected(const GURL & origin)18 bool ShellSpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
19   return true;
20 }
21 
IsStorageUnlimited(const GURL & origin)22 bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
23   return true;
24 }
25 
IsStorageDurable(const GURL & origin)26 bool ShellSpecialStoragePolicy::IsStorageDurable(const GURL& origin) {
27   // The plan is to forbid extensions from acquiring the durable storage
28   // permission because they can specify 'unlimitedStorage' in the manifest.
29   return false;
30 }
31 
IsStorageSessionOnly(const GURL & origin)32 bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
33   return false;
34 }
35 
HasSessionOnlyOrigins()36 bool ShellSpecialStoragePolicy::HasSessionOnlyOrigins() {
37   return false;
38 }
39 
40 network::SessionCleanupCookieStore::DeleteCookiePredicate
CreateDeleteCookieOnExitPredicate()41 ShellSpecialStoragePolicy::CreateDeleteCookieOnExitPredicate() {
42   return network::SessionCleanupCookieStore::DeleteCookiePredicate();
43 }
44 
HasIsolatedStorage(const GURL & origin)45 bool ShellSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) {
46   return false;
47 }
48 
49 }  // namespace extensions
50