OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_H_ |
| 6 #define CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/callback_forward.h" |
| 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/task_runner.h" |
| 14 #include "build/build_config.h" |
| 15 |
| 16 namespace browser_sync { |
| 17 |
| 18 namespace internal { |
| 19 #if defined(OS_MACOSX) |
| 20 // Returns the Hardware model name, without trailing numbers, if |
| 21 // possible. See http://www.cocoadev.com/index.pl?MacintoshModels for |
| 22 // an example list of models. If an error occurs trying to read the |
| 23 // model, this simply returns "Unknown". |
| 24 std::string GetHardwareModelName(); |
| 25 #endif |
| 26 |
| 27 #if defined(OS_WIN) |
| 28 // Returns the computer name or the empty string if an error occured. |
| 29 std::string GetComputerName(); |
| 30 #endif |
| 31 } // namespace internal |
| 32 |
| 33 void GetSessionName( |
| 34 const scoped_refptr<base::TaskRunner>& task_runner, |
| 35 const base::Callback<void(const std::string&)>& done_callback); |
| 36 |
| 37 } // namespace browser_sync |
| 38 |
| 39 #endif // CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_H_ |
OLD | NEW |