Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2189)

Unified Diff: chrome/browser/extensions/mock_extension_special_storage_policy.h

Issue 7210006: AppCaches which belong to hosted apps are not protected from deletion (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Test beautification. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/mock_extension_special_storage_policy.h
diff --git a/chrome/browser/extensions/mock_extension_special_storage_policy.h b/chrome/browser/extensions/mock_extension_special_storage_policy.h
deleted file mode 100644
index 0c481f19eb918a525b5f0aada0dc82ce5f196fe9..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/mock_extension_special_storage_policy.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
-#define CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
-#pragma once
-
-#include <set>
-#include <string>
-
-#include "chrome/browser/extensions/extension_special_storage_policy.h"
-#include "googleurl/src/gurl.h"
-
-// This class is the same as MockSpecialStoragePolicy (in
-// webkit/quota/mock_special_storage_policy.h), but it inherits
-// ExtensionSpecialStoragePolicy instead of quota::SpecialStoragePolicy.
-class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy {
- public:
- MockExtensionSpecialStoragePolicy();
- virtual ~MockExtensionSpecialStoragePolicy();
-
- virtual bool IsStorageProtected(const GURL& origin);
- virtual bool IsStorageUnlimited(const GURL& origin);
- virtual bool IsFileHandler(const std::string& extension_id);
-
- void AddProtected(const GURL& origin) {
- protected_.insert(origin);
- }
-
- void AddUnlimited(const GURL& origin) {
- unlimited_.insert(origin);
- }
-
- void AddFileHandler(const std::string& id) {
- file_handlers_.insert(id);
- }
-
- void Reset() {
- protected_.clear();
- unlimited_.clear();
- file_handlers_.clear();
- }
-
- private:
- std::set<GURL> protected_;
- std::set<GURL> unlimited_;
- std::set<std::string> file_handlers_;
-
- DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy);
-};
-
-#endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_

Powered by Google App Engine
This is Rietveld 408576698