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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix weird formatting in recent_tabs_sub_menu_model.cc Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_commands.h" 5 #include "chrome/browser/download/download_commands.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 GetBrowser()); 336 GetBrowser());
337 #else 337 #else
338 // Should only be getting invoked if we are using safe browsing. 338 // Should only be getting invoked if we are using safe browsing.
339 NOTREACHED(); 339 NOTREACHED();
340 #endif 340 #endif
341 break; 341 break;
342 } 342 }
343 case LEARN_MORE_INTERRUPTED: 343 case LEARN_MORE_INTERRUPTED:
344 GetBrowser()->OpenURL(content::OpenURLParams( 344 GetBrowser()->OpenURL(content::OpenURLParams(
345 GetLearnMoreURLForInterruptedDownload(), content::Referrer(), 345 GetLearnMoreURLForInterruptedDownload(), content::Referrer(),
346 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); 346 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
347 false));
347 break; 348 break;
348 case PAUSE: 349 case PAUSE:
349 download_item_->Pause(); 350 download_item_->Pause();
350 break; 351 break;
351 case RESUME: 352 case RESUME:
352 download_item_->Resume(); 353 download_item_->Resume();
353 break; 354 break;
354 case COPY_TO_CLIPBOARD: 355 case COPY_TO_CLIPBOARD:
355 CopyFileAsImageToClipboard(); 356 CopyFileAsImageToClipboard();
356 break; 357 break;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 download_item_->GetReceivedBytes() > kMaxImageClipboardSize) { 402 download_item_->GetReceivedBytes() > kMaxImageClipboardSize) {
402 return; 403 return;
403 } 404 }
404 405
405 if (!DownloadItemModel(download_item_).HasSupportedImageMimeType()) 406 if (!DownloadItemModel(download_item_).HasSupportedImageMimeType())
406 return; 407 return;
407 408
408 base::FilePath file_path = download_item_->GetFullPath(); 409 base::FilePath file_path = download_item_->GetFullPath();
409 ImageClipboardCopyManager::Start(file_path); 410 ImageClipboardCopyManager::Start(file_path);
410 } 411 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698