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

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

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 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_request_infobar_delegate.h" 5 #include "chrome/browser/download/download_request_infobar_delegate.h"
6 6
7 #include "chrome/browser/infobars/infobar.h"
8 #include "chrome/browser/infobars/infobar_service.h" 7 #include "chrome/browser/infobars/infobar_service.h"
8 #include "components/infobars/core/infobar.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 12
13 DownloadRequestInfoBarDelegate::FakeCreateCallback* 13 DownloadRequestInfoBarDelegate::FakeCreateCallback*
14 DownloadRequestInfoBarDelegate::callback_ = NULL; 14 DownloadRequestInfoBarDelegate::callback_ = NULL;
15 15
16 DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() { 16 DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() {
17 if (!responded_ && host_) 17 if (!responded_ && host_)
18 host_->CancelOnce(); 18 host_->CancelOnce();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 bool DownloadRequestInfoBarDelegate::Cancel() { 82 bool DownloadRequestInfoBarDelegate::Cancel() {
83 DCHECK(!responded_); 83 DCHECK(!responded_);
84 responded_ = true; 84 responded_ = true;
85 if (host_) { 85 if (host_) {
86 // This may invalidate |host_|. 86 // This may invalidate |host_|.
87 host_->Cancel(); 87 host_->Cancel();
88 } 88 }
89 return !host_; 89 return !host_;
90 } 90 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/api/debugger/debugger_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698