OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_target_determiner.h" | 5 #include "chrome/browser/download/download_target_determiner.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 mime_type, | 454 mime_type, |
455 IGNORE_IF_STALE_PLUGIN_LIST, | 455 IGNORE_IF_STALE_PLUGIN_LIST, |
456 callback))); | 456 callback))); |
457 return; | 457 return; |
458 } | 458 } |
459 // In practice, we assume that retrying once is enough. | 459 // In practice, we assume that retrying once is enough. |
460 DCHECK(!is_stale); | 460 DCHECK(!is_stale); |
461 bool is_handled_safely = | 461 bool is_handled_safely = |
462 plugin_found && | 462 plugin_found && |
463 (plugin_info.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS || | 463 (plugin_info.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS || |
464 plugin_info.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); | 464 plugin_info.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS || |
| 465 plugin_info.type == WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN); |
465 BrowserThread::PostTask( | 466 BrowserThread::PostTask( |
466 BrowserThread::UI, FROM_HERE, base::Bind(callback, is_handled_safely)); | 467 BrowserThread::UI, FROM_HERE, base::Bind(callback, is_handled_safely)); |
467 } | 468 } |
468 | 469 |
469 } // namespace | 470 } // namespace |
470 #endif // defined(ENABLE_PLUGINS) | 471 #endif // defined(ENABLE_PLUGINS) |
471 | 472 |
472 DownloadTargetDeterminer::Result | 473 DownloadTargetDeterminer::Result |
473 DownloadTargetDeterminer::DoDetermineIfHandledSafely() { | 474 DownloadTargetDeterminer::DoDetermineIfHandledSafely() { |
474 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 475 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 const base::FilePath& suggested_path) { | 892 const base::FilePath& suggested_path) { |
892 return base::FilePath(suggested_path.value() + kCrdownloadSuffix); | 893 return base::FilePath(suggested_path.value() + kCrdownloadSuffix); |
893 } | 894 } |
894 | 895 |
895 #if defined(OS_WIN) | 896 #if defined(OS_WIN) |
896 // static | 897 // static |
897 bool DownloadTargetDeterminer::IsAdobeReaderUpToDate() { | 898 bool DownloadTargetDeterminer::IsAdobeReaderUpToDate() { |
898 return g_is_adobe_reader_up_to_date_; | 899 return g_is_adobe_reader_up_to_date_; |
899 } | 900 } |
900 #endif | 901 #endif |
OLD | NEW |