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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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
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_CONVERT_USER_SCRIPT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_
6 #define CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 13
14 class Extension;
15 class FilePath; 14 class FilePath;
16 class GURL; 15 class GURL;
17 16
17 namespace extensions {
18 class Extension;
19 }
20
18 // Wraps the specified user script in an extension. The extension is created 21 // Wraps the specified user script in an extension. The extension is created
19 // unpacked in the system temp dir. Returns a valid extension that the caller 22 // unpacked in the system temp dir. Returns a valid extension that the caller
20 // should take ownership on success, or NULL and |error| on failure. 23 // should take ownership on success, or NULL and |error| on failure.
21 // 24 //
22 // NOTE: This function does file IO and should not be called on the UI thread. 25 // NOTE: This function does file IO and should not be called on the UI thread.
23 // NOTE: The caller takes ownership of the directory at extension->path() on the 26 // NOTE: The caller takes ownership of the directory at extension->path() on the
24 // returned object. 27 // returned object.
25 scoped_refptr<Extension> ConvertUserScriptToExtension( 28 scoped_refptr<extensions::Extension> ConvertUserScriptToExtension(
26 const FilePath& user_script, const GURL& original_url, string16* error); 29 const FilePath& user_script, const GURL& original_url, string16* error);
27 30
28 #endif // CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_ 31 #endif // CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/content_script_apitest.cc ('k') | chrome/browser/extensions/convert_user_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698