Add an extension override bubble and warning box for proxy extensions. (2nd attempt...
[chromium-blink-merge.git] / chrome / browser / extensions / settings_api_helpers.h
blob866fbb14997dfcdae23052a55e2deac57f8d7b5b
1 // Copyright (c) 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 CHROME_BROWSER_EXTENSIONS_SETTINGS_API_HELPERS_H_
6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_API_HELPERS_H_
8 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler.h"
10 namespace content {
11 class BrowserContext;
14 namespace extensions {
16 struct SettingsOverrides;
18 // Find which |extension| is overriding a particular |type| of setting. Returns
19 // the SettingsOverride object, or NULL if no |extension| is overriding that
20 // particular setting.
21 const extensions::SettingsOverrides* FindOverridingExtension(
22 content::BrowserContext* browser_context,
23 SettingsApiOverrideType type,
24 const Extension** extension);
26 // Returns which extension is overriding the homepage in a given
27 // |browser_context| or NULL if no extension is overriding the homepage.
28 // |home_page_url|, if non-NULL, will contain the home_page value the extension
29 // has set.
30 const Extension* GetExtensionOverridingHomepage(
31 content::BrowserContext* browser_context,
32 GURL* home_page_url);
34 // Returns which extension is overriding the homepage in a given
35 // |browser_context| or NULL if no extension is overriding the startup pages.
36 // |startup_pages|, if non-NULL, will contain the vector of startup page URLs
37 // the extension has set.
38 const Extension* GetExtensionOverridingStartupPages(
39 content::BrowserContext* browser_context,
40 std::vector<GURL>* startup_pages);
42 // Returns which extension is overriding the search engine in a given
43 // |browser_context| or NULL if no extension is overriding the search engine.
44 // |search_provider|, if non-NULL, will contain the search provider the
45 // extension has set.
46 const Extension* GetExtensionOverridingSearchEngine(
47 content::BrowserContext* browser_context,
48 api::manifest_types::ChromeSettingsOverrides::Search_provider*
49 search_provider);
51 // Returns which extension is overriding the proxy in a given |browser_context|
52 // or NULL if no extension is overriding the proxy.
53 const Extension* GetExtensionOverridingProxy(
54 content::BrowserContext* browser_context);
56 } // namespace extensions
58 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_API_HELPERS_H_