summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 04:16:27 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 04:16:27 +0000
commitad8e04ac88be37d5ccb6c2cf61f52b224dca493c (patch)
tree9bcb878643bdd9e5af6749fff469b2552e569907 /chrome/browser/extensions
parent5af8043eb24ad60251d8a4e33192e3e6f59246a3 (diff)
downloadchromium_src-ad8e04ac88be37d5ccb6c2cf61f52b224dca493c.zip
chromium_src-ad8e04ac88be37d5ccb6c2cf61f52b224dca493c.tar.gz
chromium_src-ad8e04ac88be37d5ccb6c2cf61f52b224dca493c.tar.bz2
Convert implicit scoped_refptr constructor calls to explicit ones, part 1
This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc4
-rw-r--r--chrome/browser/extensions/extension_updater.cc4
-rw-r--r--chrome/browser/extensions/extension_updater_unittest.cc40
-rw-r--r--chrome/browser/extensions/extensions_service.cc4
-rw-r--r--chrome/browser/extensions/extensions_startup.cc4
5 files changed, 28 insertions, 28 deletions
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 12ff5c0..c4e0799 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -254,8 +254,8 @@ RenderProcessHost* ExtensionProcessManager::GetExtensionProcess(
const GURL& url) {
if (!browsing_instance_->HasSiteInstance(url))
return NULL;
- scoped_refptr<SiteInstance> site =
- browsing_instance_->GetSiteInstanceForURL(url);
+ scoped_refptr<SiteInstance> site(
+ browsing_instance_->GetSiteInstanceForURL(url));
if (site->HasProcess())
return site->GetProcess();
return NULL;
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index df19489..3c678e5 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -518,8 +518,8 @@ void ExtensionUpdater::OnManifestFetchComplete(const GURL& url,
// We want to try parsing the manifest, and if it indicates updates are
// available, we want to fire off requests to fetch those updates.
if (status.status() == URLRequestStatus::SUCCESS && response_code == 200) {
- scoped_refptr<SafeManifestParser> safe_parser =
- new SafeManifestParser(data, current_manifest_fetch_.release(), this);
+ scoped_refptr<SafeManifestParser> safe_parser(
+ new SafeManifestParser(data, current_manifest_fetch_.release(), this));
safe_parser->Start();
} else {
// TODO(asargent) Do exponential backoff here. (http://crbug.com/12546).
diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc
index 581be2b..ed96b0d 100644
--- a/chrome/browser/extensions/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/extension_updater_unittest.cc
@@ -308,8 +308,8 @@ class ExtensionUpdaterTest : public testing::Test {
TestURLFetcherFactory factory;
URLFetcher::set_factory(&factory);
- scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, service.pref_service(), 60*60*24);
+ scoped_refptr<ExtensionUpdater> updater(
+ new ExtensionUpdater(&service, service.pref_service(), 60*60*24));
updater->Start();
// Tell the update that it's time to do update checks.
@@ -356,8 +356,8 @@ class ExtensionUpdaterTest : public testing::Test {
TestURLFetcherFactory factory;
URLFetcher::set_factory(&factory);
- scoped_refptr<ExtensionUpdater> updater =
- new ExtensionUpdater(&service, service.pref_service(), 60*60*24);
+ scoped_refptr<ExtensionUpdater> updater(
+ new ExtensionUpdater(&service, service.pref_service(), 60*60*24));
updater->Start();
// Tell the updater that it's time to do update checks.
@@ -408,9 +408,9 @@ class ExtensionUpdaterTest : public testing::Test {
service.set_extensions(tmp);
MessageLoop message_loop;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
// Check passing an empty list of parse results to DetermineUpdates
ManifestFetchData fetch_data(GURL("http://localhost/foo"));
@@ -445,9 +445,9 @@ class ExtensionUpdaterTest : public testing::Test {
service.set_pending_extensions(pending_extensions);
MessageLoop message_loop;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
ManifestFetchData fetch_data(GURL("http://localhost/foo"));
UpdateManifest::Results updates;
@@ -479,9 +479,9 @@ class ExtensionUpdaterTest : public testing::Test {
TestURLFetcher* fetcher = NULL;
URLFetcher::set_factory(&factory);
ServiceForDownloadTests service;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
GURL url1("http://localhost/manifest1");
GURL url2("http://localhost/manifest2");
@@ -543,9 +543,9 @@ class ExtensionUpdaterTest : public testing::Test {
TestURLFetcher* fetcher = NULL;
URLFetcher::set_factory(&factory);
ServiceForDownloadTests service;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
GURL test_url("http://localhost/extension.crx");
@@ -606,9 +606,9 @@ class ExtensionUpdaterTest : public testing::Test {
TestURLFetcher* fetcher = NULL;
URLFetcher::set_factory(&factory);
ServiceForBlacklistTests service;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
service.pref_service()->
RegisterStringPref(prefs::kExtensionBlacklistUpdateVersion, "0");
GURL test_url("http://localhost/extension.crx");
@@ -653,9 +653,9 @@ class ExtensionUpdaterTest : public testing::Test {
TestURLFetcher* fetcher = NULL;
URLFetcher::set_factory(&factory);
ServiceForDownloadTests service;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
GURL url1("http://localhost/extension1.crx");
GURL url2("http://localhost/extension2.crx");
@@ -740,9 +740,9 @@ class ExtensionUpdaterTest : public testing::Test {
}
MessageLoop message_loop;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
updater->set_blacklist_checks_enabled(false);
// Make the updater do manifest fetching, and note the urls it tries to
@@ -792,9 +792,9 @@ class ExtensionUpdaterTest : public testing::Test {
// >= 1 day for the extension.
static void TestHandleManifestResults() {
ServiceForManifestTests service;
- scoped_refptr<ExtensionUpdater> updater =
+ scoped_refptr<ExtensionUpdater> updater(
new ExtensionUpdater(&service, service.pref_service(),
- kUpdateFrequencySecs);
+ kUpdateFrequencySecs));
GURL update_url("http://www.google.com/manifest");
ExtensionList tmp;
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 5c81670..4b5b2c1 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -295,11 +295,11 @@ void ExtensionsServiceBackend::LoadSingleExtension(
file_util::AbsolutePath(&extension_path);
std::string error;
- scoped_refptr<const Extension> extension = extension_file_util::LoadExtension(
+ scoped_refptr<const Extension> extension(extension_file_util::LoadExtension(
extension_path,
Extension::LOAD,
false, // Don't require id
- &error);
+ &error));
if (!extension) {
ReportExtensionLoadError(extension_path, error);
diff --git a/chrome/browser/extensions/extensions_startup.cc b/chrome/browser/extensions/extensions_startup.cc
index 1286179..9faeac6 100644
--- a/chrome/browser/extensions/extensions_startup.cc
+++ b/chrome/browser/extensions/extensions_startup.cc
@@ -83,8 +83,8 @@ bool HandlePackExtension(const CommandLine& cmd_line) {
// Launch a job to perform the packing on the file thread.
PackExtensionLogger pack_client;
- scoped_refptr<PackExtensionJob> pack_job =
- new PackExtensionJob(&pack_client, src_dir, private_key_path);
+ scoped_refptr<PackExtensionJob> pack_job(
+ new PackExtensionJob(&pack_client, src_dir, private_key_path));
pack_job->Start();
// The job will post a notification task to the current thread's message