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

Unified Diff: chrome/browser/ui/views/select_file_dialog_extension.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/select_file_dialog_extension.cc
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.cc b/chrome/browser/ui/views/select_file_dialog_extension.cc
index 6621ee98b3915495941e2f7896d7559db85f9934..3efc1489dec9b739bc7e7eaed39d41df6b0e9b26 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.cc
+++ b/chrome/browser/ui/views/select_file_dialog_extension.cc
@@ -65,7 +65,7 @@ PendingDialog* PendingDialog::GetInstance() {
void PendingDialog::Add(int32 tab_id,
scoped_refptr<SelectFileDialogExtension> dialog) {
- DCHECK(dialog);
+ DCHECK(dialog.get());
if (map_.find(tab_id) == map_.end())
map_.insert(std::make_pair(tab_id, dialog));
else
@@ -109,7 +109,7 @@ SelectFileDialogExtension::SelectFileDialogExtension(
}
SelectFileDialogExtension::~SelectFileDialogExtension() {
- if (extension_dialog_)
+ if (extension_dialog_.get())
extension_dialog_->ObserverDestroyed();
}
@@ -168,7 +168,7 @@ void SelectFileDialogExtension::OnFileSelected(
int index) {
scoped_refptr<SelectFileDialogExtension> dialog =
PendingDialog::GetInstance()->Find(tab_id);
- if (!dialog)
+ if (!dialog.get())
return;
dialog->selection_type_ = SINGLE_FILE;
dialog->selection_files_.clear();
@@ -182,7 +182,7 @@ void SelectFileDialogExtension::OnMultiFilesSelected(
const std::vector<ui::SelectedFileInfo>& files) {
scoped_refptr<SelectFileDialogExtension> dialog =
PendingDialog::GetInstance()->Find(tab_id);
- if (!dialog)
+ if (!dialog.get())
return;
dialog->selection_type_ = MULTIPLE_FILES;
dialog->selection_files_ = files;
@@ -193,7 +193,7 @@ void SelectFileDialogExtension::OnMultiFilesSelected(
void SelectFileDialogExtension::OnFileSelectionCanceled(int32 tab_id) {
scoped_refptr<SelectFileDialogExtension> dialog =
PendingDialog::GetInstance()->Find(tab_id);
- if (!dialog)
+ if (!dialog.get())
return;
dialog->selection_type_ = CANCEL;
dialog->selection_files_.clear();
@@ -201,7 +201,7 @@ void SelectFileDialogExtension::OnFileSelectionCanceled(int32 tab_id) {
}
content::RenderViewHost* SelectFileDialogExtension::GetRenderViewHost() {
- if (extension_dialog_)
+ if (extension_dialog_.get())
return extension_dialog_->host()->render_view_host();
return NULL;
}
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/views/simple_message_box_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698