1 // Copyright 2014 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 EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/shell/browser/shell_browser_context.h"
11 #include "storage/browser/quota/special_storage_policy.h"
13 namespace extensions {
15 class ShellSpecialStoragePolicy;
17 // The BrowserContext used by the content, apps and extensions systems in
19 class ShellBrowserContext : public content::ShellBrowserContext {
21 ShellBrowserContext();
22 virtual ~ShellBrowserContext();
24 // content::BrowserContext implementation.
25 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
26 virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
28 // HACK: Pad the virtual function table so we trip an assertion if someone
29 // tries to use |this| as a Profile.
30 virtual void ProfileFunctionCallOnNonProfileBrowserContext1();
31 virtual void ProfileFunctionCallOnNonProfileBrowserContext2();
32 virtual void ProfileFunctionCallOnNonProfileBrowserContext3();
33 virtual void ProfileFunctionCallOnNonProfileBrowserContext4();
34 virtual void ProfileFunctionCallOnNonProfileBrowserContext5();
35 virtual void ProfileFunctionCallOnNonProfileBrowserContext6();
36 virtual void ProfileFunctionCallOnNonProfileBrowserContext7();
37 virtual void ProfileFunctionCallOnNonProfileBrowserContext8();
38 virtual void ProfileFunctionCallOnNonProfileBrowserContext9();
39 virtual void ProfileFunctionCallOnNonProfileBrowserContext10();
40 virtual void ProfileFunctionCallOnNonProfileBrowserContext11();
41 virtual void ProfileFunctionCallOnNonProfileBrowserContext12();
42 virtual void ProfileFunctionCallOnNonProfileBrowserContext13();
43 virtual void ProfileFunctionCallOnNonProfileBrowserContext14();
44 virtual void ProfileFunctionCallOnNonProfileBrowserContext15();
47 scoped_refptr<storage::SpecialStoragePolicy> storage_policy_;
49 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext);
52 } // namespace extensions
54 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_