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

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

Issue 1087843004: [Download Notification] Refine retry logic when interrupted or cancelled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove RETRY and use RESUME instead Created 5 years, 7 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
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_shelf_context_menu.h" 5 #include "chrome/browser/download/download_shelf_context_menu.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/download/download_item_model.h" 8 #include "chrome/browser/download/download_item_model.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 break; 158 break;
159 case DownloadCommands::CANCEL: 159 case DownloadCommands::CANCEL:
160 id = IDS_DOWNLOAD_MENU_CANCEL; 160 id = IDS_DOWNLOAD_MENU_CANCEL;
161 break; 161 break;
162 case DownloadCommands::LEARN_MORE_SCANNING: 162 case DownloadCommands::LEARN_MORE_SCANNING:
163 id = IDS_DOWNLOAD_MENU_LEARN_MORE_SCANNING; 163 id = IDS_DOWNLOAD_MENU_LEARN_MORE_SCANNING;
164 break; 164 break;
165 case DownloadCommands::LEARN_MORE_INTERRUPTED: 165 case DownloadCommands::LEARN_MORE_INTERRUPTED:
166 id = IDS_DOWNLOAD_MENU_LEARN_MORE_INTERRUPTED; 166 id = IDS_DOWNLOAD_MENU_LEARN_MORE_INTERRUPTED;
167 break; 167 break;
168 case DownloadCommands::RETRY:
169 NOTREACHED();
170 return base::string16();
171 } 168 }
172 CHECK(id != -1); 169 CHECK(id != -1);
173 return l10n_util::GetStringUTF16(id); 170 return l10n_util::GetStringUTF16(id);
174 } 171 }
175 172
176 void DownloadShelfContextMenu::DetachFromDownloadItem() { 173 void DownloadShelfContextMenu::DetachFromDownloadItem() {
177 if (!download_item_) 174 if (!download_item_)
178 return; 175 return;
179 176
180 download_commands_.reset(); 177 download_commands_.reset();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 if (malicious_download_menu_model_) 315 if (malicious_download_menu_model_)
319 return malicious_download_menu_model_.get(); 316 return malicious_download_menu_model_.get();
320 317
321 malicious_download_menu_model_.reset(new ui::SimpleMenuModel(this)); 318 malicious_download_menu_model_.reset(new ui::SimpleMenuModel(this));
322 malicious_download_menu_model_->AddItem( 319 malicious_download_menu_model_->AddItem(
323 DownloadCommands::LEARN_MORE_SCANNING, 320 DownloadCommands::LEARN_MORE_SCANNING,
324 GetLabelForCommandId(DownloadCommands::LEARN_MORE_SCANNING)); 321 GetLabelForCommandId(DownloadCommands::LEARN_MORE_SCANNING));
325 322
326 return malicious_download_menu_model_.get(); 323 return malicious_download_menu_model_.get();
327 } 324 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_commands.cc ('k') | chrome/browser/download/notification/download_notification_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698