Chromium Code Reviews| 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 "ui/views/examples/content_client/examples_main_delegate.h" | 5 #include "ui/views/examples/content_client/examples_main_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 ExamplesMainDelegate::~ExamplesMainDelegate() { | 38 ExamplesMainDelegate::~ExamplesMainDelegate() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) { | 41 bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) { |
| 42 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 42 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 43 std::string process_type = | 43 std::string process_type = |
| 44 command_line.GetSwitchValueASCII(switches::kProcessType); | 44 command_line.GetSwitchValueASCII(switches::kProcessType); |
| 45 | 45 |
| 46 content::SetContentClient(&content_client_); | 46 content::SetContentClient(&content_client_); |
| 47 | 47 |
| 48 bool success = logging::InitLogging(NULL, | 48 logging::LoggingSettings settings; |
| 49 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 49 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 50 logging::LOCK_LOG_FILE, | 50 bool success = logging::InitLogging(settings); |
|
sky
2013/06/19 23:22:28
And same question.
akalin
2013/06/20 07:35:10
ditto
| |
| 51 logging::DELETE_OLD_LOG_FILE, | |
| 52 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 53 CHECK(success); | 51 CHECK(success); |
| 54 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
| 55 logging::LogEventProvider::Initialize(kViewsExamplesProviderName); | 53 logging::LogEventProvider::Initialize(kViewsExamplesProviderName); |
| 56 #endif | 54 #endif |
| 57 | 55 |
| 58 return false; | 56 return false; |
| 59 } | 57 } |
| 60 | 58 |
| 61 void ExamplesMainDelegate::PreSandboxStartup() { | 59 void ExamplesMainDelegate::PreSandboxStartup() { |
| 62 InitializeResourceBundle(); | 60 InitializeResourceBundle(); |
| 63 } | 61 } |
| 64 | 62 |
| 65 content::ContentBrowserClient* | 63 content::ContentBrowserClient* |
| 66 ExamplesMainDelegate::CreateContentBrowserClient() { | 64 ExamplesMainDelegate::CreateContentBrowserClient() { |
| 67 browser_client_.reset(new ExamplesContentBrowserClient); | 65 browser_client_.reset(new ExamplesContentBrowserClient); |
| 68 return browser_client_.get(); | 66 return browser_client_.get(); |
| 69 } | 67 } |
| 70 | 68 |
| 71 void ExamplesMainDelegate::InitializeResourceBundle() { | 69 void ExamplesMainDelegate::InitializeResourceBundle() { |
| 72 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 70 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
| 73 } | 71 } |
| 74 | 72 |
| 75 } // namespace examples | 73 } // namespace examples |
| 76 } // namespace views | 74 } // namespace views |
| OLD | NEW |