OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/file_version_info.h" | 7 #include "base/file_version_info.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_version_info.h" |
10 #include "chrome/browser/chrome_thread.h" | 11 #include "chrome/browser/chrome_thread.h" |
11 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/sync/glue/change_processor.h" | 13 #include "chrome/browser/sync/glue/change_processor.h" |
13 #include "chrome/browser/sync/glue/database_model_worker.h" | 14 #include "chrome/browser/sync/glue/database_model_worker.h" |
14 #include "chrome/browser/sync/glue/history_model_worker.h" | 15 #include "chrome/browser/sync/glue/history_model_worker.h" |
15 #include "chrome/browser/sync/glue/sync_backend_host.h" | 16 #include "chrome/browser/sync/glue/sync_backend_host.h" |
16 #include "chrome/browser/sync/glue/http_bridge.h" | 17 #include "chrome/browser/sync/glue/http_bridge.h" |
17 #include "chrome/browser/sync/sessions/session_state.h" | 18 #include "chrome/browser/sync/sessions/session_state.h" |
18 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
19 #include "chrome/common/notification_type.h" | 20 #include "chrome/common/notification_type.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 #elif defined(OS_LINUX) | 314 #elif defined(OS_LINUX) |
314 user_agent += "LINUX "; | 315 user_agent += "LINUX "; |
315 #elif defined(OS_FREEBSD) | 316 #elif defined(OS_FREEBSD) |
316 user_agent += "FREEBSD "; | 317 user_agent += "FREEBSD "; |
317 #elif defined(OS_OPENBSD) | 318 #elif defined(OS_OPENBSD) |
318 user_agent += "OPENBSD "; | 319 user_agent += "OPENBSD "; |
319 #elif defined(OS_MACOSX) | 320 #elif defined(OS_MACOSX) |
320 user_agent += "MAC "; | 321 user_agent += "MAC "; |
321 #endif | 322 #endif |
322 scoped_ptr<FileVersionInfo> version_info( | 323 scoped_ptr<FileVersionInfo> version_info( |
323 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 324 chrome_app::GetChromeVersionInfo()); |
324 if (version_info == NULL) { | 325 if (version_info == NULL) { |
325 DLOG(ERROR) << "Unable to create FileVersionInfo object"; | 326 DLOG(ERROR) << "Unable to create FileVersionInfo object"; |
326 return user_agent; | 327 return user_agent; |
327 } | 328 } |
328 | 329 |
329 user_agent += WideToASCII(version_info->product_version()); | 330 user_agent += WideToASCII(version_info->product_version()); |
330 user_agent += " (" + WideToASCII(version_info->last_change()) + ")"; | 331 user_agent += " (" + WideToASCII(version_info->last_change()) + ")"; |
331 if (!version_info->is_official_build()) | 332 if (!version_info->is_official_build()) |
332 user_agent += "-devel"; | 333 user_agent += "-devel"; |
333 return user_agent; | 334 return user_agent; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 525 } |
525 | 526 |
526 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 527 void SyncBackendHost::Core::DeleteSyncDataFolder() { |
527 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 528 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { |
528 if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 529 if (!file_util::Delete(host_->sync_data_folder_path(), true)) |
529 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 530 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
530 } | 531 } |
531 } | 532 } |
532 | 533 |
533 } // namespace browser_sync | 534 } // namespace browser_sync |
OLD | NEW |