diff options
Diffstat (limited to 'chrome/browser/extensions')
4 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_cookies_api.cc b/chrome/browser/extensions/extension_cookies_api.cc index b97c74d..e66c4b3 100644 --- a/chrome/browser/extensions/extension_cookies_api.cc +++ b/chrome/browser/extensions/extension_cookies_api.cc @@ -409,7 +409,7 @@ bool RemoveCookieFunction::RunImpl() { // should happen after this. bool rv = BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - new RemoveCookieTask(url, name, store_context)); + new RemoveCookieTask(url, name, make_scoped_refptr(store_context))); DCHECK(rv); return true; diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc index 4b55442..9b36825 100644 --- a/chrome/browser/extensions/extension_toolbar_model.cc +++ b/chrome/browser/extensions/extension_toolbar_model.cc @@ -58,7 +58,7 @@ void ExtensionToolbarModel::MoveBrowserAction(const Extension* extension, bool inserted = false; for (ExtensionList::iterator iter = begin(); iter != end(); ++iter, ++i) { if (i == index) { - toolitems_.insert(iter, extension); + toolitems_.insert(iter, make_scoped_refptr(extension)); inserted = true; break; } @@ -68,7 +68,7 @@ void ExtensionToolbarModel::MoveBrowserAction(const Extension* extension, DCHECK_EQ(index, static_cast<int>(toolitems_.size())); index = toolitems_.size(); - toolitems_.push_back(extension); + toolitems_.push_back(make_scoped_refptr(extension)); } FOR_EACH_OBSERVER(Observer, observers_, BrowserActionMoved(extension, index)); @@ -111,11 +111,12 @@ void ExtensionToolbarModel::AddExtension(const Extension* extension) { if (extension->id() == last_extension_removed_ && last_extension_removed_index_ < toolitems_.size()) { - toolitems_.insert(begin() + last_extension_removed_index_, extension); + toolitems_.insert(begin() + last_extension_removed_index_, + make_scoped_refptr(extension)); FOR_EACH_OBSERVER(Observer, observers_, BrowserActionAdded(extension, last_extension_removed_index_)); } else { - toolitems_.push_back(extension); + toolitems_.push_back(make_scoped_refptr(extension)); FOR_EACH_OBSERVER(Observer, observers_, BrowserActionAdded(extension, toolitems_.size() - 1)); } @@ -172,7 +173,7 @@ void ExtensionToolbarModel::InitializeExtensionList() { int index = std::distance(pref_order.begin(), pos); sorted[index] = extension; } else { - unsorted.push_back(extension); + unsorted.push_back(make_scoped_refptr(extension)); } } diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 1591eb2..98681de 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -891,7 +891,7 @@ void ExtensionsService::EnableExtension(const std::string& extension_id) { extension_prefs_->SetExtensionState(extension, Extension::ENABLED); // Move it over to the enabled list. - extensions_.push_back(extension); + extensions_.push_back(make_scoped_refptr(extension)); ExtensionList::iterator iter = std::find(disabled_extensions_.begin(), disabled_extensions_.end(), extension); @@ -916,7 +916,7 @@ void ExtensionsService::DisableExtension(const std::string& extension_id) { extension_prefs_->SetExtensionState(extension, Extension::DISABLED); // Move it over to the disabled list. - disabled_extensions_.push_back(extension); + disabled_extensions_.push_back(make_scoped_refptr(extension)); ExtensionList::iterator iter = std::find(extensions_.begin(), extensions_.end(), extension); diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index dab980d..ee979f33 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -422,7 +422,7 @@ class ExtensionsServiceTest switch (type.value) { case NotificationType::EXTENSION_LOADED: { const Extension* extension = Details<const Extension>(details).ptr(); - loaded_.push_back(extension); + loaded_.push_back(make_scoped_refptr(extension)); // The tests rely on the errors being in a certain order, which can vary // depending on how filesystem iteration works. std::stable_sort(loaded_.begin(), loaded_.end(), ExtensionsOrder()); |