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

Side by Side Diff: extensions/renderer/bindings/api_binding_util.cc

Issue 2967443004: [Extensions Bindings] Fix getPlatform() method (Closed)
Patch Set: Rebase Created 3 years, 5 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 2017 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 "extensions/renderer/bindings/api_binding_util.h"
6
7 #include "base/logging.h"
8 #include "build/build_config.h"
9
10 namespace extensions {
11 namespace binding {
12
13 std::string GetPlatformString() {
14 #if defined(OS_CHROMEOS)
15 return "chromeos";
16 #elif defined(OS_LINUX)
17 return "linux";
18 #elif defined(OS_MACOSX)
19 return "mac";
20 #elif defined(OS_WIN)
21 return "win";
22 #else
23 NOTREACHED();
24 return std::string();
25 #endif
26 }
27
28 } // namespace binding
29 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698