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

Side by Side Diff: chrome/browser/chromeos/chromeos_utils.cc

Issue 479733002: [EasyUnlock] Update settings string from "Chrome device" to "Chromebook" or "Chromebox" as appropri… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/chromeos_utils.h" 5 #include "chrome/browser/chromeos/chromeos_utils.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 12 matching lines...) Expand all
23 // can find a list of ChromeOS device and board names at http://go/cros-names 23 // can find a list of ChromeOS device and board names at http://go/cros-names
24 const char* const kChromeboxBoards[] = { 24 const char* const kChromeboxBoards[] = {
25 "panther", 25 "panther",
26 "stumpy", 26 "stumpy",
27 "zako", 27 "zako",
28 }; 28 };
29 29
30 } // namespace 30 } // namespace
31 31
32 base::string16 GetChromeDeviceType() { 32 base::string16 GetChromeDeviceType() {
33 return l10n_util::GetStringUTF16(GetChromeDeviceTypeResourceId());
34 }
35
36 int GetChromeDeviceTypeResourceId() {
33 const std::string board = base::SysInfo::GetLsbReleaseBoard(); 37 const std::string board = base::SysInfo::GetLsbReleaseBoard();
34 for (size_t i = 0; i < arraysize(kChromeboxBoards); ++i) { 38 for (size_t i = 0; i < arraysize(kChromeboxBoards); ++i) {
35 if (StartsWithASCII(board, kChromeboxBoards[i], true)) 39 if (StartsWithASCII(board, kChromeboxBoards[i], true))
36 return l10n_util::GetStringUTF16(IDS_CHROMEBOX); 40 return IDS_CHROMEBOX;
37 } 41 }
38 for (size_t i = 0; i < arraysize(kChromebaseBoards); ++i) { 42 for (size_t i = 0; i < arraysize(kChromebaseBoards); ++i) {
39 if (StartsWithASCII(board, kChromebaseBoards[i], true)) 43 if (StartsWithASCII(board, kChromebaseBoards[i], true))
40 return l10n_util::GetStringUTF16(IDS_CHROMEBASE); 44 return IDS_CHROMEBASE;
41 } 45 }
42 return l10n_util::GetStringUTF16(IDS_CHROMEBOOK); 46 return IDS_CHROMEBOOK;
43 } 47 }
44 48
45 } // namespace chromeos 49 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chromeos_utils.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698