Fix Win8 metro startup crash from window switcher button
[chromium-blink-merge.git] / webkit / quota / mock_special_storage_policy.cc
blob5aaf21cbd6015f5f47afa5109072fd0e0d599659
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::CanQueryDiskSize(const GURL& origin) {
28 return can_query_disk_size_.find(origin) != can_query_disk_size_.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