OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 chrome::RegisterInternalDefaultPlugin(); | 759 chrome::RegisterInternalDefaultPlugin(); |
760 | 760 |
761 // Register the internal Flash if available. | 761 // Register the internal Flash if available. |
762 FilePath path; | 762 FilePath path; |
763 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 763 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
764 switches::kDisableInternalFlash) && | 764 switches::kDisableInternalFlash) && |
765 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { | 765 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { |
766 webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); | 766 webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); |
767 } | 767 } |
768 | 768 |
| 769 #if defined(OS_POSIX) |
| 770 // Also find plugins in a user-specific plugins dir, |
| 771 // e.g. ~/.config/chromium/Plugins. |
| 772 FilePath user_data_dir; |
| 773 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
| 774 webkit::npapi::PluginList::Singleton()->AddExtraPluginDir( |
| 775 user_data_dir.Append("Plugins")); |
| 776 } |
| 777 #endif |
| 778 |
769 scoped_ptr<IOThread> thread(new IOThread( | 779 scoped_ptr<IOThread> thread(new IOThread( |
770 local_state(), net_log_.get(), extension_event_router_forwarder_.get())); | 780 local_state(), net_log_.get(), extension_event_router_forwarder_.get())); |
771 base::Thread::Options options; | 781 base::Thread::Options options; |
772 options.message_loop_type = MessageLoop::TYPE_IO; | 782 options.message_loop_type = MessageLoop::TYPE_IO; |
773 if (!thread->StartWithOptions(options)) | 783 if (!thread->StartWithOptions(options)) |
774 return; | 784 return; |
775 io_thread_.swap(thread); | 785 io_thread_.swap(thread); |
776 } | 786 } |
777 | 787 |
778 void BrowserProcessImpl::CreateFileThread() { | 788 void BrowserProcessImpl::CreateFileThread() { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 } | 1128 } |
1119 | 1129 |
1120 void BrowserProcessImpl::OnAutoupdateTimer() { | 1130 void BrowserProcessImpl::OnAutoupdateTimer() { |
1121 if (CanAutorestartForUpdate()) { | 1131 if (CanAutorestartForUpdate()) { |
1122 DLOG(WARNING) << "Detected update. Restarting browser."; | 1132 DLOG(WARNING) << "Detected update. Restarting browser."; |
1123 RestartPersistentInstance(); | 1133 RestartPersistentInstance(); |
1124 } | 1134 } |
1125 } | 1135 } |
1126 | 1136 |
1127 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1137 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |