Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 5815001: Fixed file_version_info so that it finds Mac values correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a file Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698