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

Side by Side Diff: ash/system/chromeos/devicetype_utils.cc

Issue 2072013002: mash: Move tray settings and deps to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo 'git cl format' and nullptr changes. Created 4 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2015 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 #include "ash/system/chromeos/devicetype_utils.h"
6
7 #include "chromeos/system/devicetype.h"
8 #include "grit/ash_strings.h"
9 #include "ui/base/l10n/l10n_util.h"
10
11 namespace ash {
12
13 base::string16 SubstituteChromeOSDeviceType(int resource_id) {
14 return l10n_util::GetStringFUTF16(resource_id, GetChromeOSDeviceName());
15 }
16
17 base::string16 GetChromeOSDeviceName() {
18 return l10n_util::GetStringUTF16(GetChromeOSDeviceTypeResourceId());
19 }
20
21 int GetChromeOSDeviceTypeResourceId() {
22 switch (chromeos::GetDeviceType()) {
23 case chromeos::DeviceType::kChromebase:
24 return IDS_ASH_CHROMEBASE;
25 case chromeos::DeviceType::kChromebook:
26 return IDS_ASH_CHROMEBOOK;
27 case chromeos::DeviceType::kChromebox:
28 return IDS_ASH_CHROMEBOX;
29 case chromeos::DeviceType::kChromebit:
30 return IDS_ASH_CHROMEBIT;
31 case chromeos::DeviceType::kUnknown:
32 default:
33 return IDS_ASH_CHROMEDEVICE;
34 }
35 }
36
37 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698