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

Side by Side Diff: chrome/browser/extensions/extension_preference_api.h

Issue 6871019: Enable (optional) blocking of webrequests in case a PAC script cannot be fetched or is invalid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class PrefTransformerInterface { 44 class PrefTransformerInterface {
45 public: 45 public:
46 virtual ~PrefTransformerInterface() {} 46 virtual ~PrefTransformerInterface() {}
47 47
48 // Converts the representation of a preference as seen by the extension 48 // Converts the representation of a preference as seen by the extension
49 // into a representation that is used in the pref stores of the browser. 49 // into a representation that is used in the pref stores of the browser.
50 // Returns the pref store representation in case of success or sets 50 // Returns the pref store representation in case of success or sets
51 // |error| and returns NULL otherwise. 51 // |error| and returns NULL otherwise.
52 // The ownership of the returned value is passed to the caller. 52 // The ownership of the returned value is passed to the caller.
53 // TODO(battre): add bool* bad_message to allow terminating the entire
54 // extension in order to simulate the behavior of EXTENSION_FUNCTION_VALIDATE.
53 virtual Value* ExtensionToBrowserPref(const Value* extension_pref, 55 virtual Value* ExtensionToBrowserPref(const Value* extension_pref,
54 std::string* error) = 0; 56 std::string* error) = 0;
55 57
56 // Converts the representation of the preference as stored in the browser 58 // Converts the representation of the preference as stored in the browser
57 // into a representation that is used by the extension. 59 // into a representation that is used by the extension.
58 // Returns the extension representation in case of success or NULL otherwise. 60 // Returns the extension representation in case of success or NULL otherwise.
59 // The ownership of the returned value is passed to the caller. 61 // The ownership of the returned value is passed to the caller.
60 virtual Value* BrowserToExtensionPref(const Value* browser_pref) = 0; 62 virtual Value* BrowserToExtensionPref(const Value* browser_pref) = 0;
61 }; 63 };
62 64
(...skipping 12 matching lines...) Expand all
75 }; 77 };
76 78
77 class ClearPreferenceFunction : public SyncExtensionFunction { 79 class ClearPreferenceFunction : public SyncExtensionFunction {
78 public: 80 public:
79 virtual ~ClearPreferenceFunction(); 81 virtual ~ClearPreferenceFunction();
80 virtual bool RunImpl(); 82 virtual bool RunImpl();
81 DECLARE_EXTENSION_FUNCTION_NAME("experimental.preferences.clear") 83 DECLARE_EXTENSION_FUNCTION_NAME("experimental.preferences.clear")
82 }; 84 };
83 85
84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__ 86 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFERENCE_API_H__
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/extensions/extension_proxy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698