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