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

Side by Side Diff: content/shell/app/shell_main_delegate.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
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/shell/app/shell_main_delegate.h" 5 #include "content/shell/app/shell_main_delegate.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 int ShellMainDelegate::RunProcess( 267 int ShellMainDelegate::RunProcess(
268 const std::string& process_type, 268 const std::string& process_type,
269 const MainFunctionParams& main_function_params) { 269 const MainFunctionParams& main_function_params) {
270 if (!process_type.empty()) 270 if (!process_type.empty())
271 return -1; 271 return -1;
272 272
273 #if !defined(OS_ANDROID) 273 #if !defined(OS_ANDROID)
274 // Android stores the BrowserMainRunner instance as a scoped member pointer 274 // Android stores the BrowserMainRunner instance as a scoped member pointer
275 // on the ShellMainDelegate class because of different object lifetime. 275 // on the ShellMainDelegate class because of different object lifetime.
276 scoped_ptr<BrowserMainRunner> browser_runner_; 276 std::unique_ptr<BrowserMainRunner> browser_runner_;
277 #endif 277 #endif
278 278
279 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser"); 279 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser");
280 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( 280 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
281 kTraceEventBrowserProcessSortIndex); 281 kTraceEventBrowserProcessSortIndex);
282 282
283 browser_runner_.reset(BrowserMainRunner::Create()); 283 browser_runner_.reset(BrowserMainRunner::Create());
284 base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); 284 base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
285 return command_line.HasSwitch(switches::kRunLayoutTest) || 285 return command_line.HasSwitch(switches::kRunLayoutTest) ||
286 command_line.HasSwitch(switches::kCheckLayoutTestSysDeps) 286 command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 return renderer_client_.get(); 362 return renderer_client_.get();
363 } 363 }
364 364
365 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { 365 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() {
366 utility_client_.reset(new ShellContentUtilityClient); 366 utility_client_.reset(new ShellContentUtilityClient);
367 return utility_client_.get(); 367 return utility_client_.get();
368 } 368 }
369 369
370 } // namespace content 370 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/app/shell_main_delegate.h ('k') | content/shell/browser/layout_test/blink_test_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698