| 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 "chrome/browser/sync/util/get_session_name.h" | 5 #include "sync/util/get_session_name.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 12 #include "base/task_runner.h" | 12 #include "base/task_runner.h" |
| 13 | 13 |
| 14 #if defined(OS_LINUX) | 14 #if defined(OS_LINUX) |
| 15 #include "base/linux_util.h" | 15 #include "base/linux_util.h" |
| 16 #elif defined(OS_MACOSX) | 16 #elif defined(OS_MACOSX) |
| 17 #include "chrome/browser/sync/util/get_session_name_mac.h" | 17 #include "sync/util/get_session_name_mac.h" |
| 18 #elif defined(OS_WIN) | 18 #elif defined(OS_WIN) |
| 19 #include "chrome/browser/sync/util/get_session_name_win.h" | 19 #include "sync/util/get_session_name_win.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace browser_sync { | 22 namespace browser_sync { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 std::string GetSessionNameSynchronously() { | 26 std::string GetSessionNameSynchronously() { |
| 27 std::string session_name; | 27 std::string session_name; |
| 28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 29 session_name = "Chromebook"; | 29 session_name = "Chromebook"; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 base::Bind(&OnSessionNameFilled, | 64 base::Bind(&OnSessionNameFilled, |
| 65 done_callback, | 65 done_callback, |
| 66 base::Owned(session_name))); | 66 base::Owned(session_name))); |
| 67 } | 67 } |
| 68 | 68 |
| 69 std::string GetSessionNameSynchronouslyForTesting() { | 69 std::string GetSessionNameSynchronouslyForTesting() { |
| 70 return GetSessionNameSynchronously(); | 70 return GetSessionNameSynchronously(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace browser_sync | 73 } // namespace browser_sync |
| OLD | NEW |