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

Side by Side Diff: chrome/browser/download/download_danger_prompt.cc

Issue 11740018: Cleanup: Remove more unneeded browser_thread.h includes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/download/download_danger_prompt.h" 5 #include "chrome/browser/download/download_danger_prompt.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/download/chrome_download_manager_delegate.h" 8 #include "chrome/browser/download/chrome_download_manager_delegate.h"
9 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 9 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" 10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/download_danger_type.h" 11 #include "content/public/browser/download_danger_type.h"
13 #include "content/public/browser/download_item.h" 12 #include "content/public/browser/download_item.h"
14 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
16 15
17 namespace { 16 namespace {
18 17
19 // Implements DownloadDangerPrompt using a TabModalConfirmDialog. 18 // Implements DownloadDangerPrompt using a TabModalConfirmDialog.
20 class DownloadDangerPromptImpl 19 class DownloadDangerPromptImpl
21 : public DownloadDangerPrompt, 20 : public DownloadDangerPrompt,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 131
133 void DownloadDangerPromptImpl::PrepareToClose() { 132 void DownloadDangerPromptImpl::PrepareToClose() {
134 accepted_.Reset(); 133 accepted_.Reset();
135 canceled_.Reset(); 134 canceled_.Reset();
136 if (download_ != NULL) { 135 if (download_ != NULL) {
137 download_->RemoveObserver(this); 136 download_->RemoveObserver(this);
138 download_ = NULL; 137 download_ = NULL;
139 } 138 }
140 } 139 }
141 140
142 } // namespace 141 } // namespace
143 142
144 // static 143 // static
145 DownloadDangerPrompt* DownloadDangerPrompt::Create( 144 DownloadDangerPrompt* DownloadDangerPrompt::Create(
146 content::DownloadItem* item, 145 content::DownloadItem* item,
147 content::WebContents* web_contents, 146 content::WebContents* web_contents,
148 const base::Closure& accepted, 147 const base::Closure& accepted,
149 const base::Closure& canceled) { 148 const base::Closure& canceled) {
150 DownloadDangerPromptImpl* prompt = 149 DownloadDangerPromptImpl* prompt =
151 new DownloadDangerPromptImpl(item, web_contents, accepted, canceled); 150 new DownloadDangerPromptImpl(item, web_contents, accepted, canceled);
152 // |prompt| will be deleted when the dialog is done. 151 // |prompt| will be deleted when the dialog is done.
153 TabModalConfirmDialog::Create(prompt, web_contents); 152 TabModalConfirmDialog::Create(prompt, web_contents);
154 return prompt; 153 return prompt;
155 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/browser_list_tabcontents_provider.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698