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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin_error.h

Issue 876483002: NaCl: Move src/trusted/plugin/ to components/nacl/renderer/plugin/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update #include guards Created 5 years, 10 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 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 /*
8 * Error codes and data structures used to report errors when loading a nexe.
9 */
10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_ERROR_H
12 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_ERROR_H
13
14 #include <string>
15
16 #include "native_client/src/include/nacl_macros.h"
17 #include "ppapi/c/private/ppb_nacl_private.h"
18
19 namespace plugin {
20
21 class ErrorInfo {
22 public:
23 ErrorInfo() {
24 SetReport(PP_NACL_ERROR_UNKNOWN, std::string());
25 }
26
27 void SetReport(PP_NaClError error_code, const std::string& message) {
28 error_code_ = error_code;
29 message_ = message;
30 }
31
32 PP_NaClError error_code() const {
33 return error_code_;
34 }
35
36 const std::string& message() const {
37 return message_;
38 }
39
40 private:
41 PP_NaClError error_code_;
42 std::string message_;
43 NACL_DISALLOW_COPY_AND_ASSIGN(ErrorInfo);
44 };
45
46 } // namespace plugin
47
48 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_ERROR_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698