OLD | NEW |
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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 } | 615 } |
616 | 616 |
617 BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() { | 617 BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() { |
618 #if defined(OS_ANDROID) | 618 #if defined(OS_ANDROID) |
619 return NULL; | 619 return NULL; |
620 #else | 620 #else |
621 return bookmark_prompt_controller_.get(); | 621 return bookmark_prompt_controller_.get(); |
622 #endif | 622 #endif |
623 } | 623 } |
624 | 624 |
625 chrome::StorageMonitor* BrowserProcessImpl::storage_monitor() { | 625 StorageMonitor* BrowserProcessImpl::storage_monitor() { |
626 #if defined(OS_ANDROID) || defined(OS_IOS) | 626 #if defined(OS_ANDROID) || defined(OS_IOS) |
627 return NULL; | 627 return NULL; |
628 #else | 628 #else |
629 return storage_monitor_.get(); | 629 return storage_monitor_.get(); |
630 #endif | 630 #endif |
631 } | 631 } |
632 | 632 |
633 void BrowserProcessImpl::set_storage_monitor_for_test( | 633 void BrowserProcessImpl::set_storage_monitor_for_test( |
634 scoped_ptr<chrome::StorageMonitor> monitor) { | 634 scoped_ptr<StorageMonitor> monitor) { |
635 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 635 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
636 storage_monitor_ = monitor.Pass(); | 636 storage_monitor_ = monitor.Pass(); |
637 #endif | 637 #endif |
638 } | 638 } |
639 | 639 |
640 chrome::MediaFileSystemRegistry* | 640 MediaFileSystemRegistry* BrowserProcessImpl::media_file_system_registry() { |
641 BrowserProcessImpl::media_file_system_registry() { | |
642 #if defined(OS_ANDROID) || defined(OS_IOS) | 641 #if defined(OS_ANDROID) || defined(OS_IOS) |
643 return NULL; | 642 return NULL; |
644 #else | 643 #else |
645 if (!media_file_system_registry_) | 644 if (!media_file_system_registry_) |
646 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); | 645 media_file_system_registry_.reset(new MediaFileSystemRegistry()); |
647 return media_file_system_registry_.get(); | 646 return media_file_system_registry_.get(); |
648 #endif | 647 #endif |
649 } | 648 } |
650 | 649 |
651 bool BrowserProcessImpl::created_local_state() const { | 650 bool BrowserProcessImpl::created_local_state() const { |
652 return created_local_state_; | 651 return created_local_state_; |
653 } | 652 } |
654 | 653 |
655 #if defined(ENABLE_WEBRTC) | 654 #if defined(ENABLE_WEBRTC) |
656 WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { | 655 WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 } | 921 } |
923 | 922 |
924 #if !defined(OS_ANDROID) | 923 #if !defined(OS_ANDROID) |
925 if (browser_defaults::bookmarks_enabled && | 924 if (browser_defaults::bookmarks_enabled && |
926 BookmarkPromptController::IsEnabled()) { | 925 BookmarkPromptController::IsEnabled()) { |
927 bookmark_prompt_controller_.reset(new BookmarkPromptController()); | 926 bookmark_prompt_controller_.reset(new BookmarkPromptController()); |
928 } | 927 } |
929 #endif | 928 #endif |
930 | 929 |
931 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 930 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
932 storage_monitor_.reset(chrome::StorageMonitor::Create()); | 931 storage_monitor_.reset(StorageMonitor::Create()); |
933 #endif | 932 #endif |
934 | 933 |
935 platform_part_->PreMainMessageLoopRun(); | 934 platform_part_->PreMainMessageLoopRun(); |
936 } | 935 } |
937 | 936 |
938 void BrowserProcessImpl::CreateIconManager() { | 937 void BrowserProcessImpl::CreateIconManager() { |
939 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 938 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
940 created_icon_manager_ = true; | 939 created_icon_manager_ = true; |
941 icon_manager_.reset(new IconManager); | 940 icon_manager_.reset(new IconManager); |
942 } | 941 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 } | 1060 } |
1062 | 1061 |
1063 void BrowserProcessImpl::OnAutoupdateTimer() { | 1062 void BrowserProcessImpl::OnAutoupdateTimer() { |
1064 if (CanAutorestartForUpdate()) { | 1063 if (CanAutorestartForUpdate()) { |
1065 DLOG(WARNING) << "Detected update. Restarting browser."; | 1064 DLOG(WARNING) << "Detected update. Restarting browser."; |
1066 RestartBackgroundInstance(); | 1065 RestartBackgroundInstance(); |
1067 } | 1066 } |
1068 } | 1067 } |
1069 | 1068 |
1070 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1069 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |