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

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

Issue 957673003: Chrome OS Gaia: Set param 'chrometype' for MinuteMaid (chromebox, chromebase or chromebook) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 28 matching lines...) Expand all
39 if (StartsWithASCII(board, kChromeboxBoards[i], true)) 39 if (StartsWithASCII(board, kChromeboxBoards[i], true))
40 return IDS_CHROMEBOX; 40 return IDS_CHROMEBOX;
41 } 41 }
42 for (size_t i = 0; i < arraysize(kChromebaseBoards); ++i) { 42 for (size_t i = 0; i < arraysize(kChromebaseBoards); ++i) {
43 if (StartsWithASCII(board, kChromebaseBoards[i], true)) 43 if (StartsWithASCII(board, kChromebaseBoards[i], true))
44 return IDS_CHROMEBASE; 44 return IDS_CHROMEBASE;
45 } 45 }
46 return IDS_CHROMEBOOK; 46 return IDS_CHROMEBOOK;
47 } 47 }
48 48
49 std::string GetChromeDeviceTypeForMinuteMaid() {
50 int resource_id = GetChromeDeviceTypeResourceId();
51 switch (resource_id) {
52 case IDS_CHROMEBOX:
53 return "chromebox";
Nikita (slow) 2015/02/25 09:28:43 nit: I suggest making these static constants and d
Roman Sorokin (ftl) 2015/02/25 10:28:39 Done.
54 case IDS_CHROMEBASE:
55 return "chromebase";
56 case IDS_CHROMEBOOK:
57 return "chromebook";
58 }
59 NOTREACHED() << "Unknown Chrome device type" << resource_id;
60 return std::string();
61 }
62
49 } // namespace chromeos 63 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698