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

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

Issue 25112004: Move statistics_provider to chromeos/system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments Created 7 years, 2 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 | « chromeos/system/statistics_provider.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 17 matching lines...) Expand all
28 28
29 namespace syncer { 29 namespace syncer {
30 30
31 namespace { 31 namespace {
32 32
33 std::string GetSessionNameSynchronously() { 33 std::string GetSessionNameSynchronously() {
34 std::string session_name; 34 std::string session_name;
35 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
36 // The approach below is similar to that used by the CrOs implementation of 36 // The approach below is similar to that used by the CrOs implementation of
37 // StatisticsProvider::GetMachineStatistic(CHROMEOS_RELEASE_BOARD). 37 // StatisticsProvider::GetMachineStatistic(CHROMEOS_RELEASE_BOARD).
38 // See chrome/browser/chromeos/system/statistics_provider.{h|cc}. 38 // See chromeos/system/statistics_provider.{h|cc}.
39 // 39 //
40 // We cannot use StatisticsProvider here because of the mutual dependency 40 // We cannot use StatisticsProvider here because of the mutual dependency
41 // it creates between sync.gyp:sync and chrome.gyp:browser. 41 // it creates between sync.gyp:sync and chrome.gyp:browser.
42 // 42 //
43 // Even though this code is ad hoc and fragile, it remains the only means of 43 // Even though this code is ad hoc and fragile, it remains the only means of
44 // determining the Chrome OS hardware platform so we can display the right 44 // determining the Chrome OS hardware platform so we can display the right
45 // device name in the "Other devices" section of the new tab page. 45 // device name in the "Other devices" section of the new tab page.
46 // TODO(rsimha): Change this once a better alternative is available. 46 // TODO(rsimha): Change this once a better alternative is available.
47 // See http://crbug.com/126732. 47 // See http://crbug.com/126732.
48 std::string board; 48 std::string board;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 base::Bind(&OnSessionNameFilled, 102 base::Bind(&OnSessionNameFilled,
103 done_callback, 103 done_callback,
104 base::Owned(session_name))); 104 base::Owned(session_name)));
105 } 105 }
106 106
107 std::string GetSessionNameSynchronouslyForTesting() { 107 std::string GetSessionNameSynchronouslyForTesting() {
108 return GetSessionNameSynchronously(); 108 return GetSessionNameSynchronously();
109 } 109 }
110 110
111 } // namespace syncer 111 } // namespace syncer
OLDNEW
« no previous file with comments | « chromeos/system/statistics_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698