| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 return notifier_options; | 224 return notifier_options; |
| 225 } | 225 } |
| 226 | 226 |
| 227 int SyncClientMain(int argc, char* argv[]) { | 227 int SyncClientMain(int argc, char* argv[]) { |
| 228 #if defined(OS_MACOSX) | 228 #if defined(OS_MACOSX) |
| 229 base::mac::ScopedNSAutoreleasePool pool; | 229 base::mac::ScopedNSAutoreleasePool pool; |
| 230 #endif | 230 #endif |
| 231 base::AtExitManager exit_manager; | 231 base::AtExitManager exit_manager; |
| 232 CommandLine::Init(argc, argv); | 232 CommandLine::Init(argc, argv); |
| 233 logging::InitLogging( | 233 logging::LoggingSettings settings; |
| 234 NULL, | 234 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 235 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 235 logging::InitLogging(settings); |
| 236 logging::LOCK_LOG_FILE, | |
| 237 logging::DELETE_OLD_LOG_FILE, | |
| 238 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 239 | 236 |
| 240 base::MessageLoop sync_loop; | 237 base::MessageLoop sync_loop; |
| 241 base::Thread io_thread("IO thread"); | 238 base::Thread io_thread("IO thread"); |
| 242 base::Thread::Options options; | 239 base::Thread::Options options; |
| 243 options.message_loop_type = base::MessageLoop::TYPE_IO; | 240 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 244 io_thread.StartWithOptions(options); | 241 io_thread.StartWithOptions(options); |
| 245 | 242 |
| 246 // Parse command line. | 243 // Parse command line. |
| 247 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 244 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 248 SyncCredentials credentials; | 245 SyncCredentials credentials; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 io_thread.Stop(); | 353 io_thread.Stop(); |
| 357 return 0; | 354 return 0; |
| 358 } | 355 } |
| 359 | 356 |
| 360 } // namespace | 357 } // namespace |
| 361 } // namespace syncer | 358 } // namespace syncer |
| 362 | 359 |
| 363 int main(int argc, char* argv[]) { | 360 int main(int argc, char* argv[]) { |
| 364 return syncer::SyncClientMain(argc, argv); | 361 return syncer::SyncClientMain(argc, argv); |
| 365 } | 362 } |
| OLD | NEW |