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

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: Rebase. 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 GetBrowser()); 335 GetBrowser());
336 #else 336 #else
337 // Should only be getting invoked if we are using safe browsing. 337 // Should only be getting invoked if we are using safe browsing.
338 NOTREACHED(); 338 NOTREACHED();
339 #endif 339 #endif
340 break; 340 break;
341 } 341 }
342 case LEARN_MORE_INTERRUPTED: 342 case LEARN_MORE_INTERRUPTED:
343 GetBrowser()->OpenURL(content::OpenURLParams( 343 GetBrowser()->OpenURL(content::OpenURLParams(
344 GetLearnMoreURLForInterruptedDownload(), content::Referrer(), 344 GetLearnMoreURLForInterruptedDownload(), content::Referrer(),
345 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); 345 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
346 false));
346 break; 347 break;
347 case PAUSE: 348 case PAUSE:
348 download_item_->Pause(); 349 download_item_->Pause();
349 break; 350 break;
350 case RESUME: 351 case RESUME:
351 download_item_->Resume(); 352 download_item_->Resume();
352 break; 353 break;
353 case COPY_TO_CLIPBOARD: 354 case COPY_TO_CLIPBOARD:
354 CopyFileAsImageToClipboard(); 355 CopyFileAsImageToClipboard();
355 break; 356 break;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 download_item_->GetReceivedBytes() > kMaxImageClipboardSize) { 401 download_item_->GetReceivedBytes() > kMaxImageClipboardSize) {
401 return; 402 return;
402 } 403 }
403 404
404 if (!DownloadItemModel(download_item_).HasSupportedImageMimeType()) 405 if (!DownloadItemModel(download_item_).HasSupportedImageMimeType())
405 return; 406 return;
406 407
407 base::FilePath file_path = download_item_->GetFullPath(); 408 base::FilePath file_path = download_item_->GetFullPath();
408 ImageClipboardCopyManager::Start(file_path); 409 ImageClipboardCopyManager::Start(file_path);
409 } 410 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_danger_prompt_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698