Add a webstorePrivate API to show a permission prompt for delegated bundle installs
[chromium-blink-merge.git] / chrome / browser / extensions / mock_extension_special_storage_policy.h
bloba485284ee5ce54445e6857d12005c122dc83de08
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 #ifndef CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_
8 #include <set>
9 #include <string>
11 #include "chrome/browser/extensions/extension_special_storage_policy.h"
12 #include "url/gurl.h"
14 // This class is the same as MockSpecialStoragePolicy (in
15 // content/public/test/mock_special_storage_policy.h), but it inherits
16 // ExtensionSpecialStoragePolicy instead of storage::SpecialStoragePolicy.
17 class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy {
18 public:
19 MockExtensionSpecialStoragePolicy();
21 // storage::SpecialStoragePolicy:
22 bool IsStorageProtected(const GURL& origin) override;
23 bool IsStorageUnlimited(const GURL& origin) override;
24 bool IsStorageSessionOnly(const GURL& origin) override;
25 bool CanQueryDiskSize(const GURL& origin) override;
26 bool HasSessionOnlyOrigins() override;
28 void AddProtected(const GURL& origin) {
29 protected_.insert(origin);
32 private:
33 ~MockExtensionSpecialStoragePolicy() override;
35 std::set<GURL> protected_;
37 DISALLOW_COPY_AND_ASSIGN(MockExtensionSpecialStoragePolicy);
40 #endif // CHROME_BROWSER_EXTENSIONS_MOCK_EXTENSION_SPECIAL_STORAGE_POLICY_H_