| 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 "content/public/app/content_main.h" | 5 #include "content/public/app/content_main.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include <memory> |
| 8 |
| 8 #include "content/public/app/content_main_runner.h" | 9 #include "content/public/app/content_main_runner.h" |
| 9 | 10 |
| 10 namespace content { | 11 namespace content { |
| 11 | 12 |
| 12 int ContentMain(const ContentMainParams& params) { | 13 int ContentMain(const ContentMainParams& params) { |
| 13 scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create()); | 14 std::unique_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create()); |
| 14 | 15 |
| 15 int exit_code = main_runner->Initialize(params); | 16 int exit_code = main_runner->Initialize(params); |
| 16 if (exit_code >= 0) | 17 if (exit_code >= 0) |
| 17 return exit_code; | 18 return exit_code; |
| 18 | 19 |
| 19 exit_code = main_runner->Run(); | 20 exit_code = main_runner->Run(); |
| 20 | 21 |
| 21 main_runner->Shutdown(); | 22 main_runner->Shutdown(); |
| 22 | 23 |
| 23 return exit_code; | 24 return exit_code; |
| 24 } | 25 } |
| 25 | 26 |
| 26 } // namespace content | 27 } // namespace content |
| OLD | NEW |