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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_options.cc

Issue 235983020: Pepper: Move PnaclOptions outside trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another build fix Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/trusted/plugin/pnacl_options.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_options.cc b/ppapi/native_client/src/trusted/plugin/pnacl_options.cc
deleted file mode 100644
index 46d7c2473058d46120aebcb5efe37286f55a2273..0000000000000000000000000000000000000000
--- a/ppapi/native_client/src/trusted/plugin/pnacl_options.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/native_client/src/trusted/plugin/pnacl_options.h"
-
-#include <iterator>
-#include <vector>
-
-#include "native_client/src/include/nacl_string.h"
-
-namespace plugin {
-
-PnaclOptions::PnaclOptions()
- : translate_(false),
- is_debug_(false),
- opt_level_(2) {
-}
-
-PnaclOptions::~PnaclOptions() {
-}
-
-void PnaclOptions::set_opt_level(int32_t l) {
- if (l <= 0) {
- opt_level_ = 0;
- return;
- }
- // Currently only allow 0 or 2, since that is what we test.
- opt_level_ = 2;
-}
-
-std::vector<char> PnaclOptions::GetOptCommandline() const {
- std::vector<char> result;
- nacl::string str;
-
- nacl::stringstream ss;
- ss << "-O" << opt_level_;
- str = ss.str();
- std::copy(str.begin(), str.end(), std::back_inserter(result));
- result.push_back('\x00');
- // Debug info is only available in LLVM format pexes,
- // not in PNaCl format pexes.
- if (is_debug_) {
- str = "-bitcode-format=llvm";
- std::copy(str.begin(), str.end(), std::back_inserter(result));
- result.push_back('\x00');
- }
-
- return result;
-}
-
-} // namespace plugin

Powered by Google App Engine
This is Rietveld 408576698