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

Side by Side Diff: content/utility/utility_main.cc

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 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
« no previous file with comments | « content/utility/utility_blink_platform_impl.h ('k') | content/utility/utility_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/leak_annotations.h" 6 #include "base/debug/leak_annotations.h"
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "base/timer/hi_res_timer_manager.h" 10 #include "base/timer/hi_res_timer_manager.h"
(...skipping 19 matching lines...) Expand all
30 base::PlatformThread::SetName("CrUtilityMain"); 30 base::PlatformThread::SetName("CrUtilityMain");
31 31
32 #if defined(OS_LINUX) 32 #if defined(OS_LINUX)
33 // Initializes the sandbox before any threads are created. 33 // Initializes the sandbox before any threads are created.
34 // TODO(jorgelo): move this after GTK initialization when we enable a strict 34 // TODO(jorgelo): move this after GTK initialization when we enable a strict
35 // Seccomp-BPF policy. 35 // Seccomp-BPF policy.
36 if (parameters.zygote_child) 36 if (parameters.zygote_child)
37 LinuxSandbox::InitializeSandbox(); 37 LinuxSandbox::InitializeSandbox();
38 #endif 38 #endif
39 39
40 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); 40 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
41 feature_list->InitializeFromCommandLine( 41 feature_list->InitializeFromCommandLine(
42 parameters.command_line.GetSwitchValueASCII(switches::kEnableFeatures), 42 parameters.command_line.GetSwitchValueASCII(switches::kEnableFeatures),
43 parameters.command_line.GetSwitchValueASCII(switches::kDisableFeatures)); 43 parameters.command_line.GetSwitchValueASCII(switches::kDisableFeatures));
44 base::FeatureList::SetInstance(std::move(feature_list)); 44 base::FeatureList::SetInstance(std::move(feature_list));
45 45
46 ChildProcess utility_process; 46 ChildProcess utility_process;
47 utility_process.set_main_thread(new UtilityThreadImpl()); 47 utility_process.set_main_thread(new UtilityThreadImpl());
48 48
49 base::HighResolutionTimerManager hi_res_timer_manager; 49 base::HighResolutionTimerManager hi_res_timer_manager;
50 50
(...skipping 17 matching lines...) Expand all
68 #if defined(LEAK_SANITIZER) 68 #if defined(LEAK_SANITIZER)
69 // Invoke LeakSanitizer before shutting down the utility thread, to avoid 69 // Invoke LeakSanitizer before shutting down the utility thread, to avoid
70 // reporting shutdown-only leaks. 70 // reporting shutdown-only leaks.
71 __lsan_do_leak_check(); 71 __lsan_do_leak_check();
72 #endif 72 #endif
73 73
74 return 0; 74 return 0;
75 } 75 }
76 76
77 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/utility/utility_blink_platform_impl.h ('k') | content/utility/utility_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698