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

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

Issue 340057: Add first-class support for user scripts (Closed)
Patch Set: newness Created 11 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/convert_user_script.h
diff --git a/chrome/browser/extensions/convert_user_script.h b/chrome/browser/extensions/convert_user_script.h
new file mode 100644
index 0000000000000000000000000000000000000000..ebc9ee23f6197173f4b231390a6d2af790384a17
--- /dev/null
+++ b/chrome/browser/extensions/convert_user_script.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_
+#define CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_
+
+#include <string>
+
+class Extension;
+class FilePath;
+class GURL;
+
+// Wraps the specified user script in an extension. The extension is created
+// unpacked in the system temp dir. Returns a valid extension that the caller
+// should take ownership on success, or NULL and |error| on failure.
+//
+// NOTE: This function does file IO and should not be called on the UI thread.
+Extension* ConvertUserScriptToExtension(const FilePath& user_script,
+ const GURL& original_url,
+ std::string* error);
+
+#endif // CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_

Powered by Google App Engine
This is Rietveld 408576698