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

Side by Side Diff: webkit/plugins/npapi/plugin_utils.cc

Issue 16206002: Add more support for FreeBSD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/npapi/plugin_utils.h" 5 #include "webkit/plugins/npapi/plugin_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 30 matching lines...) Expand all
41 no_leading_zeros_version += (j < n) ? numbers[i].substr(j) : "0"; 41 no_leading_zeros_version += (j < n) ? numbers[i].substr(j) : "0";
42 if (i != numbers.size() - 1) { 42 if (i != numbers.size() - 1) {
43 no_leading_zeros_version += "."; 43 no_leading_zeros_version += ".";
44 } 44 }
45 } 45 }
46 46
47 *parsed_version = Version(no_leading_zeros_version); 47 *parsed_version = Version(no_leading_zeros_version);
48 } 48 }
49 49
50 bool NPAPIPluginsSupported() { 50 bool NPAPIPluginsSupported() {
51 #if defined(OS_WIN) || defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_ AURA)) 51 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \
52 (defined(OS_LINUX) && !defined(USE_AURA))
52 return true; 53 return true;
53 #else 54 #else
54 return false; 55 return false;
55 #endif 56 #endif
56 } 57 }
57 58
58 void SetForcefullyTerminatePluginProcess(bool value) { 59 void SetForcefullyTerminatePluginProcess(bool value) {
59 g_forcefully_terminate_plugin_process = value; 60 g_forcefully_terminate_plugin_process = value;
60 } 61 }
61 62
62 bool ShouldForcefullyTerminatePluginProcess() { 63 bool ShouldForcefullyTerminatePluginProcess() {
63 return g_forcefully_terminate_plugin_process; 64 return g_forcefully_terminate_plugin_process;
64 } 65 }
65 66
66 } // namespace npapi 67 } // namespace npapi
67 } // namespace webkit 68 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698