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

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

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/chrome_download_manager_delegate.h" 5 #include "chrome/browser/download/chrome_download_manager_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/common/chrome_constants.h" 42 #include "chrome/common/chrome_constants.h"
43 #include "chrome/common/pref_names.h" 43 #include "chrome/common/pref_names.h"
44 #include "components/pref_registry/pref_registry_syncable.h" 44 #include "components/pref_registry/pref_registry_syncable.h"
45 #include "content/public/browser/download_item.h" 45 #include "content/public/browser/download_item.h"
46 #include "content/public/browser/download_manager.h" 46 #include "content/public/browser/download_manager.h"
47 #include "content/public/browser/notification_source.h" 47 #include "content/public/browser/notification_source.h"
48 #include "content/public/browser/page_navigator.h" 48 #include "content/public/browser/page_navigator.h"
49 #include "net/base/filename_util.h" 49 #include "net/base/filename_util.h"
50 #include "net/base/mime_util.h" 50 #include "net/base/mime_util.h"
51 51
52 #if defined(OS_ANDROID) 52 #if defined(ANDROID_JAVA_UI)
53 #include "chrome/browser/android/download/chrome_download_manager_overwrite_info bar_delegate.h" 53 #include "chrome/browser/android/download/chrome_download_manager_overwrite_info bar_delegate.h"
54 #include "chrome/browser/infobars/infobar_service.h" 54 #include "chrome/browser/infobars/infobar_service.h"
55 #endif 55 #endif
56 56
57 #if defined(OS_CHROMEOS) 57 #if defined(OS_CHROMEOS)
58 #include "chrome/browser/chromeos/drive/download_handler.h" 58 #include "chrome/browser/chromeos/drive/download_handler.h"
59 #include "chrome/browser/chromeos/drive/file_system_util.h" 59 #include "chrome/browser/chromeos/drive/file_system_util.h"
60 #endif 60 #endif
61 61
62 #if defined(ENABLE_EXTENSIONS) 62 #if defined(ENABLE_EXTENSIONS)
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 create_directory, 572 create_directory,
573 conflict_action, 573 conflict_action,
574 callback); 574 callback);
575 } 575 }
576 576
577 void ChromeDownloadManagerDelegate::PromptUserForDownloadPath( 577 void ChromeDownloadManagerDelegate::PromptUserForDownloadPath(
578 DownloadItem* download, 578 DownloadItem* download,
579 const base::FilePath& suggested_path, 579 const base::FilePath& suggested_path,
580 const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback) { 580 const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback) {
581 DCHECK_CURRENTLY_ON(BrowserThread::UI); 581 DCHECK_CURRENTLY_ON(BrowserThread::UI);
582 #if defined(OS_ANDROID) 582 #if defined(ANDROID_JAVA_UI)
583 chrome::android::ChromeDownloadManagerOverwriteInfoBarDelegate::Create( 583 chrome::android::ChromeDownloadManagerOverwriteInfoBarDelegate::Create(
584 InfoBarService::FromWebContents(download->GetWebContents()), 584 InfoBarService::FromWebContents(download->GetWebContents()),
585 suggested_path, callback); 585 suggested_path, callback);
586 #else 586 #else
587 DownloadFilePicker::ShowFilePicker(download, suggested_path, callback); 587 DownloadFilePicker::ShowFilePicker(download, suggested_path, callback);
588 #endif 588 #endif
589 } 589 }
590 590
591 void ChromeDownloadManagerDelegate::DetermineLocalPath( 591 void ChromeDownloadManagerDelegate::DetermineLocalPath(
592 DownloadItem* download, 592 DownloadItem* download,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 path.MatchesExtension(FILE_PATH_LITERAL(".xht")) || 752 path.MatchesExtension(FILE_PATH_LITERAL(".xht")) ||
753 path.MatchesExtension(FILE_PATH_LITERAL(".xhtm")) || 753 path.MatchesExtension(FILE_PATH_LITERAL(".xhtm")) ||
754 path.MatchesExtension(FILE_PATH_LITERAL(".xhtml")) || 754 path.MatchesExtension(FILE_PATH_LITERAL(".xhtml")) ||
755 path.MatchesExtension(FILE_PATH_LITERAL(".xsl")) || 755 path.MatchesExtension(FILE_PATH_LITERAL(".xsl")) ||
756 path.MatchesExtension(FILE_PATH_LITERAL(".xslt"))) { 756 path.MatchesExtension(FILE_PATH_LITERAL(".xslt"))) {
757 return true; 757 return true;
758 } 758 }
759 #endif 759 #endif
760 return false; 760 return false;
761 } 761 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698