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()12ShellSpecialStoragePolicy::ShellSpecialStoragePolicy() { 13 } 14 ~ShellSpecialStoragePolicy()15ShellSpecialStoragePolicy::~ShellSpecialStoragePolicy() { 16 } 17 IsStorageProtected(const GURL & origin)18bool ShellSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { 19 return true; 20 } 21 IsStorageUnlimited(const GURL & origin)22bool ShellSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { 23 return true; 24 } 25 IsStorageDurable(const GURL & origin)26bool 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)32bool ShellSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { 33 return false; 34 } 35 HasSessionOnlyOrigins()36bool ShellSpecialStoragePolicy::HasSessionOnlyOrigins() { 37 return false; 38 } 39 40 network::SessionCleanupCookieStore::DeleteCookiePredicate CreateDeleteCookieOnExitPredicate()41ShellSpecialStoragePolicy::CreateDeleteCookieOnExitPredicate() { 42 return network::SessionCleanupCookieStore::DeleteCookiePredicate(); 43 } 44 HasIsolatedStorage(const GURL & origin)45bool ShellSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { 46 return false; 47 } 48 49 } // namespace extensions 50