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

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

Issue 220253002: Add net/base/filename_util.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/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/browser/ui/browser_finder.h" 42 #include "chrome/browser/ui/browser_finder.h"
43 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 43 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
44 #include "chrome/common/chrome_constants.h" 44 #include "chrome/common/chrome_constants.h"
45 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
46 #include "components/user_prefs/pref_registry_syncable.h" 46 #include "components/user_prefs/pref_registry_syncable.h"
47 #include "content/public/browser/download_item.h" 47 #include "content/public/browser/download_item.h"
48 #include "content/public/browser/download_manager.h" 48 #include "content/public/browser/download_manager.h"
49 #include "content/public/browser/notification_source.h" 49 #include "content/public/browser/notification_source.h"
50 #include "content/public/browser/page_navigator.h" 50 #include "content/public/browser/page_navigator.h"
51 #include "extensions/common/constants.h" 51 #include "extensions/common/constants.h"
52 #include "net/base/filename_util.h"
52 #include "net/base/mime_util.h" 53 #include "net/base/mime_util.h"
53 #include "net/base/net_util.h"
54 54
55 #if defined(OS_CHROMEOS) 55 #if defined(OS_CHROMEOS)
56 #include "chrome/browser/chromeos/drive/download_handler.h" 56 #include "chrome/browser/chromeos/drive/download_handler.h"
57 #include "chrome/browser/chromeos/drive/file_system_util.h" 57 #include "chrome/browser/chromeos/drive/file_system_util.h"
58 #endif 58 #endif
59 59
60 using content::BrowserThread; 60 using content::BrowserThread;
61 using content::DownloadItem; 61 using content::DownloadItem;
62 using content::DownloadManager; 62 using content::DownloadManager;
63 using safe_browsing::DownloadProtectionService; 63 using safe_browsing::DownloadProtectionService;
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 DownloadItem* item = download_manager_->GetDownload(download_id); 704 DownloadItem* item = download_manager_->GetDownload(download_id);
705 if (!target_info->target_path.empty() && item && 705 if (!target_info->target_path.empty() && item &&
706 IsOpenInBrowserPreferreredForFile(target_info->target_path) && 706 IsOpenInBrowserPreferreredForFile(target_info->target_path) &&
707 target_info->is_filetype_handled_safely) 707 target_info->is_filetype_handled_safely)
708 DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); 708 DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
709 callback.Run(target_info->target_path, 709 callback.Run(target_info->target_path,
710 target_info->target_disposition, 710 target_info->target_disposition,
711 target_info->danger_type, 711 target_info->danger_type,
712 target_info->intermediate_path); 712 target_info->intermediate_path);
713 } 713 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/open_with_browser.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698