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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2589253002: Remove discardable_memory::DSMM::{Create,Get}Instance() (Closed)
Patch Set: Fix trybot Created 4 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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 726 }
727 727
728 #if defined(OS_WIN) 728 #if defined(OS_WIN)
729 if (base::win::GetVersion() >= base::win::VERSION_WIN8) 729 if (base::win::GetVersion() >= base::win::VERSION_WIN8)
730 screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin()); 730 screen_orientation_delegate_.reset(new ScreenOrientationDelegateWin());
731 #endif 731 #endif
732 732
733 // Only use discardable_memory::DiscardableSharedMemoryManager when Chrome is 733 // Only use discardable_memory::DiscardableSharedMemoryManager when Chrome is
734 // not running in mus+ash. 734 // not running in mus+ash.
735 if (!service_manager::ServiceManagerIsRemote()) { 735 if (!service_manager::ServiceManagerIsRemote()) {
736 auto* discardable_shared_memory_manager = 736 discardable_shared_memory_manager_ =
737 discardable_memory::DiscardableSharedMemoryManager::CreateInstance(); 737 base::MakeUnique<discardable_memory::DiscardableSharedMemoryManager>();
738
739 // TODO(boliu): kSingleProcess check is a temporary workaround for 738 // TODO(boliu): kSingleProcess check is a temporary workaround for
740 // in-process Android WebView. crbug.com/503724 tracks proper fix. 739 // in-process Android WebView. crbug.com/503724 tracks proper fix.
741 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) { 740 if (!parsed_command_line_.HasSwitch(switches::kSingleProcess)) {
742 base::DiscardableMemoryAllocator::SetInstance( 741 base::DiscardableMemoryAllocator::SetInstance(
743 discardable_shared_memory_manager); 742 discardable_shared_memory_manager_.get());
744 } 743 }
745 } 744 }
746 745
747 if (parts_) 746 if (parts_)
748 parts_->PostMainMessageLoopStart(); 747 parts_->PostMainMessageLoopStart();
749 748
750 // Start startup tracing through TracingController's interface. TraceLog has 749 // Start startup tracing through TracingController's interface. TraceLog has
751 // been enabled in content_main_runner where threads are not available. Now We 750 // been enabled in content_main_runner where threads are not available. Now We
752 // need to start tracing for all other tracing agents, which require threads. 751 // need to start tracing for all other tracing agents, which require threads.
753 if (parsed_command_line_.HasSwitch(switches::kTraceStartup)) { 752 if (parsed_command_line_.HasSwitch(switches::kTraceStartup)) {
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 if (!audio_manager_) { 1792 if (!audio_manager_) {
1794 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1793 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1795 audio_manager_ = media::AudioManager::Create( 1794 audio_manager_ = media::AudioManager::Create(
1796 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1795 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1797 MediaInternals::GetInstance()); 1796 MediaInternals::GetInstance());
1798 } 1797 }
1799 CHECK(audio_manager_); 1798 CHECK(audio_manager_);
1800 } 1799 }
1801 1800
1802 } // namespace content 1801 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698