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

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

Issue 8662008: Implement chrome.systemPrivate.getIncognitoModeAvailability extension API function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made destructor virtual Created 9 years, 1 month 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/extension_system_api.h
diff --git a/chrome/browser/extensions/extension_system_api.h b/chrome/browser/extensions/extension_system_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..8279c77b7331ad18c84b933a42211f797f950a82
--- /dev/null
+++ b/chrome/browser/extensions/extension_system_api.h
@@ -0,0 +1,40 @@
+// 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.
+
+// This is a dumping ground for APIs that are provided for component extensions
Aaron Boodman 2011/11/28 19:32:44 I don't think this comment is accurate. 'system' i
+// that shall not be exposed publicly. In case any of this functionality
+// has to be made available for all extensions, it should be moved to a
+// proper namespace.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_API_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_API_H_
+
+#include "chrome/browser/extensions/extension_preference_api.h"
+
+#include <string>
+
+namespace base {
+class Value;
+}
+
+// Transforms the internal numeric representation of
+// prefs::kIncognitoModeAvailability into strings exposed to extensions.
+class IncognitoModeAvailabilityTransformer : public PrefTransformerInterface {
+ public:
+ IncognitoModeAvailabilityTransformer();
+ virtual ~IncognitoModeAvailabilityTransformer();
+
+ virtual base::Value* ExtensionToBrowserPref(
+ const base::Value* extension_pref,
+ std::string* error,
+ bool* bad_message) OVERRIDE;
+
+ virtual base::Value* BrowserToExtensionPref(
+ const base::Value* browser_pref) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IncognitoModeAvailabilityTransformer);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_API_H_

Powered by Google App Engine
This is Rietveld 408576698