summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/convert_user_script.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 23:29:19 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 23:29:19 +0000
commit844bf242eb8cf058a52dd523164278bfbde23f42 (patch)
tree2ed5864945e7983fdbe23be2bde8fa09d758a11e /chrome/browser/extensions/convert_user_script.h
parent5bd1c88a74cefc0d924be9ba6b6f0eb23972f00c (diff)
downloadchromium_src-844bf242eb8cf058a52dd523164278bfbde23f42.zip
chromium_src-844bf242eb8cf058a52dd523164278bfbde23f42.tar.gz
chromium_src-844bf242eb8cf058a52dd523164278bfbde23f42.tar.bz2
Revert 63962 (broke chromeos and chromium linux builder) - Unrevert r63919: "Part 2 of immutable Extension refactor."
I made Extension a refcounted object, and privitized the existing con/destructor and InitFromValue. The only way to get an Extension is to call a factory method. In the next CL, I plan to make the factory method return a const Extension, to guarantee that no one can modify the Extension object after creation. Note: There was a tricky part of this CL because of the difference in semantics between scoped_ptr and scoped_refptr. I had to be careful not to use ptr.release(), since that would result in leaks (an un-Released AddRef). BUG=56558 TEST=no functional change Original Review URL: http://codereview.chromium.org/3982001 TBR=aa Review URL: http://codereview.chromium.org/4186002 TBR=mpcomplete@chromium.org Review URL: http://codereview.chromium.org/4130004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/convert_user_script.h')
-rw-r--r--chrome/browser/extensions/convert_user_script.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/extensions/convert_user_script.h b/chrome/browser/extensions/convert_user_script.h
index d779de0..d392c4d 100644
--- a/chrome/browser/extensions/convert_user_script.h
+++ b/chrome/browser/extensions/convert_user_script.h
@@ -8,8 +8,6 @@
#include <string>
-#include "base/ref_counted.h"
-
class Extension;
class FilePath;
class GURL;
@@ -19,7 +17,8 @@ class GURL;
// 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.
-scoped_refptr<Extension> ConvertUserScriptToExtension(
- const FilePath& user_script, const GURL& original_url, std::string* error);
+Extension* ConvertUserScriptToExtension(const FilePath& user_script,
+ const GURL& original_url,
+ std::string* error);
#endif // CHROME_BROWSER_EXTENSIONS_CONVERT_USER_SCRIPT_H_