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

Side by Side Diff: chrome/browser/plugin_installer.cc

Issue 9639001: Move download interrupt reasons to content\public (the enum that's used by chrome). The rest keep i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 8 years, 9 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/plugin_installer.h" 5 #include "chrome/browser/plugin_installer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 case DownloadItem::CANCELLED: { 89 case DownloadItem::CANCELLED: {
90 DownloadCancelled(); 90 DownloadCancelled();
91 break; 91 break;
92 } 92 }
93 case DownloadItem::REMOVING: { 93 case DownloadItem::REMOVING: {
94 DCHECK_EQ(kStateDownloading, state_); 94 DCHECK_EQ(kStateDownloading, state_);
95 state_ = kStateIdle; 95 state_ = kStateIdle;
96 break; 96 break;
97 } 97 }
98 case DownloadItem::INTERRUPTED: { 98 case DownloadItem::INTERRUPTED: {
99 InterruptReason reason = download->GetLastReason(); 99 content::DownloadInterruptReason reason = download->GetLastReason();
100 DownloadError(InterruptReasonDebugString(reason)); 100 DownloadError(content::InterruptReasonDebugString(reason));
101 break; 101 break;
102 } 102 }
103 case DownloadItem::MAX_DOWNLOAD_STATE: { 103 case DownloadItem::MAX_DOWNLOAD_STATE: {
104 NOTREACHED(); 104 NOTREACHED();
105 return; 105 return;
106 } 106 }
107 } 107 }
108 download->RemoveObserver(this); 108 download->RemoveObserver(this);
109 } 109 }
110 110
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 DCHECK(state_ == kStateDownloading); 186 DCHECK(state_ == kStateDownloading);
187 state_ = kStateIdle; 187 state_ = kStateIdle;
188 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg)); 188 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg));
189 } 189 }
190 190
191 void PluginInstaller::DownloadCancelled() { 191 void PluginInstaller::DownloadCancelled() {
192 DCHECK(state_ == kStateDownloading); 192 DCHECK(state_ == kStateDownloading);
193 state_ = kStateIdle; 193 state_ = kStateIdle;
194 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled()); 194 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled());
195 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_extension_api.cc ('k') | content/browser/download/download_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698