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

Side by Side Diff: sync/util/get_session_name.cc

Issue 10540149: [Sync] Persist keystore key across restarts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 8 years, 4 months 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
« no previous file with comments | « sync/util/cryptographer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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"
(...skipping 25 matching lines...) Expand all
36 chromeos::system::StatisticsProvider* provider = 36 chromeos::system::StatisticsProvider* provider =
37 chromeos::system::StatisticsProvider::GetInstance(); 37 chromeos::system::StatisticsProvider::GetInstance();
38 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board)) 38 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board))
39 LOG(ERROR) << "Failed to get board information"; 39 LOG(ERROR) << "Failed to get board information";
40 // Currently, only "stumpy" type of board is considered Chromebox, and 40 // Currently, only "stumpy" type of board is considered Chromebox, and
41 // anything else is Chromebook. 41 // anything else is Chromebook.
42 session_name = (board == "stumpy") ? "Chromebox" : "Chromebook"; 42 session_name = (board == "stumpy") ? "Chromebox" : "Chromebook";
43 #elif defined(OS_LINUX) 43 #elif defined(OS_LINUX)
44 session_name = base::GetLinuxDistro(); 44 session_name = base::GetLinuxDistro();
45 #elif defined(OS_MACOSX) 45 #elif defined(OS_MACOSX)
46 // session_name = internal::GetHardwareModelName(); 46 session_name = internal::GetHardwareModelName();
47 #elif defined(OS_WIN) 47 #elif defined(OS_WIN)
48 session_name = internal::GetComputerName(); 48 session_name = internal::GetComputerName();
49 #elif defined(OS_ANDROID) 49 #elif defined(OS_ANDROID)
50 session_name = internal::GetModel(); 50 session_name = internal::GetModel();
51 #endif 51 #endif
52 52
53 if (session_name == "Unknown" || session_name.empty()) 53 if (session_name == "Unknown" || session_name.empty())
54 session_name = base::SysInfo::OperatingSystemName(); 54 session_name = base::SysInfo::OperatingSystemName();
55 55
56 return session_name; 56 return session_name;
(...skipping 22 matching lines...) Expand all
79 base::Bind(&OnSessionNameFilled, 79 base::Bind(&OnSessionNameFilled,
80 done_callback, 80 done_callback,
81 base::Owned(session_name))); 81 base::Owned(session_name)));
82 } 82 }
83 83
84 std::string GetSessionNameSynchronouslyForTesting() { 84 std::string GetSessionNameSynchronouslyForTesting() {
85 return GetSessionNameSynchronously(); 85 return GetSessionNameSynchronously();
86 } 86 }
87 87
88 } // namespace syncer 88 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/util/cryptographer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698