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

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

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/browser/browser_context.cc ('k') | content/browser/browser_main_loop.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) 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.h" 5 #include "content/browser/browser_main.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include <memory>
8
8 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
9 #include "content/common/content_constants_internal.h" 10 #include "content/common/content_constants_internal.h"
10 #include "content/public/browser/browser_main_runner.h" 11 #include "content/public/browser/browser_main_runner.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 namespace { 15 namespace {
15 16
16 // Generates a pair of BrowserMain async events. We don't use the TRACE_EVENT0 17 // Generates a pair of BrowserMain async events. We don't use the TRACE_EVENT0
17 // macro because the tracing infrastructure doesn't expect synchronous events 18 // macro because the tracing infrastructure doesn't expect synchronous events
(...skipping 11 matching lines...) Expand all
29 } // namespace 30 } // namespace
30 31
31 // Main routine for running as the Browser process. 32 // Main routine for running as the Browser process.
32 int BrowserMain(const MainFunctionParams& parameters) { 33 int BrowserMain(const MainFunctionParams& parameters) {
33 ScopedBrowserMainEvent scoped_browser_main_event; 34 ScopedBrowserMainEvent scoped_browser_main_event;
34 35
35 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser"); 36 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser");
36 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( 37 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
37 kTraceEventBrowserProcessSortIndex); 38 kTraceEventBrowserProcessSortIndex);
38 39
39 scoped_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create()); 40 std::unique_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create());
40 41
41 int exit_code = main_runner->Initialize(parameters); 42 int exit_code = main_runner->Initialize(parameters);
42 if (exit_code >= 0) 43 if (exit_code >= 0)
43 return exit_code; 44 return exit_code;
44 45
45 exit_code = main_runner->Run(); 46 exit_code = main_runner->Run();
46 47
47 main_runner->Shutdown(); 48 main_runner->Shutdown();
48 49
49 return exit_code; 50 return exit_code;
50 } 51 }
51 52
52 } // namespace content 53 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/browser_main_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698