Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / webkit / quota / mock_special_storage_policy.cc
blob340e169e90c6ff45909b76a5c8e7c2ad3ba57b92
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"
7 namespace quota {
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) {
18 if (all_unlimited_)
19 return true;
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() {}
41 } // namespace quota