1 // Copyright (c) 2012 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.
5 #include "webkit/quota/mock_special_storage_policy.h"
9 MockSpecialStoragePolicy::MockSpecialStoragePolicy()
10 : all_unlimited_(false) {
13 bool MockSpecialStoragePolicy::IsStorageProtected(const GURL
& origin
) {
14 return protected_
.find(origin
) != protected_
.end();
17 bool MockSpecialStoragePolicy::IsStorageUnlimited(const GURL
& origin
) {
20 return unlimited_
.find(origin
) != unlimited_
.end();
23 bool MockSpecialStoragePolicy::IsStorageSessionOnly(const GURL
& origin
) {
24 return session_only_
.find(origin
) != session_only_
.end();
27 bool MockSpecialStoragePolicy::IsInstalledApp(const GURL
& origin
) {
28 return installed_
.find(origin
) != installed_
.end();
31 bool MockSpecialStoragePolicy::IsFileHandler(const std::string
& extension_id
) {
32 return file_handlers_
.find(extension_id
) != file_handlers_
.end();
35 bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() {
36 return !session_only_
.empty();
39 MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {}