OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 #elif defined(OS_LINUX) | 476 #elif defined(OS_LINUX) |
477 user_agent += "LINUX "; | 477 user_agent += "LINUX "; |
478 #elif defined(OS_FREEBSD) | 478 #elif defined(OS_FREEBSD) |
479 user_agent += "FREEBSD "; | 479 user_agent += "FREEBSD "; |
480 #elif defined(OS_OPENBSD) | 480 #elif defined(OS_OPENBSD) |
481 user_agent += "OPENBSD "; | 481 user_agent += "OPENBSD "; |
482 #elif defined(OS_MACOSX) | 482 #elif defined(OS_MACOSX) |
483 user_agent += "MAC "; | 483 user_agent += "MAC "; |
484 #endif | 484 #endif |
485 chrome::VersionInfo version_info; | 485 chrome::VersionInfo version_info; |
486 if (!version_info.is_valid()) { | |
487 DLOG(ERROR) << "Unable to create chrome::VersionInfo object"; | |
488 return user_agent; | |
489 } | |
490 | |
491 user_agent += version_info.Version(); | 486 user_agent += version_info.Version(); |
492 user_agent += " (" + version_info.LastChange() + ")"; | 487 user_agent += " (" + version_info.LastChange() + ")"; |
493 if (!version_info.IsOfficialBuild()) | 488 if (!version_info.IsOfficialBuild()) |
494 user_agent += "-devel"; | 489 user_agent += "-devel"; |
495 return user_agent; | 490 return user_agent; |
496 } | 491 } |
497 | 492 |
498 void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) { | 493 void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) { |
499 DCHECK(MessageLoop::current() == host_->core_thread_.message_loop()); | 494 DCHECK(MessageLoop::current() == host_->core_thread_.message_loop()); |
500 | 495 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 } | 813 } |
819 | 814 |
820 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 815 void SyncBackendHost::Core::DeleteSyncDataFolder() { |
821 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 816 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { |
822 if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 817 if (!file_util::Delete(host_->sync_data_folder_path(), true)) |
823 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 818 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
824 } | 819 } |
825 } | 820 } |
826 | 821 |
827 } // namespace browser_sync | 822 } // namespace browser_sync |
OLD | NEW |