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 <cstddef> | 5 #include <cstddef> |
6 #include <cstdio> | 6 #include <cstdio> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return notifier_options; | 143 return notifier_options; |
144 } | 144 } |
145 | 145 |
146 int SyncListenNotificationsMain(int argc, char* argv[]) { | 146 int SyncListenNotificationsMain(int argc, char* argv[]) { |
147 using namespace syncer; | 147 using namespace syncer; |
148 #if defined(OS_MACOSX) | 148 #if defined(OS_MACOSX) |
149 base::mac::ScopedNSAutoreleasePool pool; | 149 base::mac::ScopedNSAutoreleasePool pool; |
150 #endif | 150 #endif |
151 base::AtExitManager exit_manager; | 151 base::AtExitManager exit_manager; |
152 CommandLine::Init(argc, argv); | 152 CommandLine::Init(argc, argv); |
153 logging::InitLogging( | 153 logging::LoggingSettings settings; |
154 NULL, | 154 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
155 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 155 logging::InitLogging(settings); |
156 logging::LOCK_LOG_FILE, | |
157 logging::DELETE_OLD_LOG_FILE, | |
158 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
159 | 156 |
160 base::MessageLoop ui_loop; | 157 base::MessageLoop ui_loop; |
161 base::Thread io_thread("IO thread"); | 158 base::Thread io_thread("IO thread"); |
162 base::Thread::Options options; | 159 base::Thread::Options options; |
163 options.message_loop_type = base::MessageLoop::TYPE_IO; | 160 options.message_loop_type = base::MessageLoop::TYPE_IO; |
164 io_thread.StartWithOptions(options); | 161 io_thread.StartWithOptions(options); |
165 | 162 |
166 // Parse command line. | 163 // Parse command line. |
167 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 164 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
168 std::string email = command_line.GetSwitchValueASCII(kEmailSwitch); | 165 std::string email = command_line.GetSwitchValueASCII(kEmailSwitch); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 io_thread.Stop(); | 211 io_thread.Stop(); |
215 return 0; | 212 return 0; |
216 } | 213 } |
217 | 214 |
218 } // namespace | 215 } // namespace |
219 } // namespace syncer | 216 } // namespace syncer |
220 | 217 |
221 int main(int argc, char* argv[]) { | 218 int main(int argc, char* argv[]) { |
222 return syncer::SyncListenNotificationsMain(argc, argv); | 219 return syncer::SyncListenNotificationsMain(argc, argv); |
223 } | 220 } |
OLD | NEW |