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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * Error codes and data structures used to report errors when loading a nexe. 8 * Error codes and data structures used to report errors when loading a nexe.
9 */ 9 */
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ERROR_MAX 102 ERROR_MAX
103 }; 103 };
104 104
105 class ErrorInfo { 105 class ErrorInfo {
106 public: 106 public:
107 ErrorInfo() { 107 ErrorInfo() {
108 Reset(); 108 Reset();
109 } 109 }
110 110
111 void Reset() { 111 void Reset() {
112 SetReport(ERROR_UNKNOWN, ""); 112 SetReport(ERROR_UNKNOWN, std::string());
113 } 113 }
114 114
115 void SetReport(PluginErrorCode error_code, const std::string& message) { 115 void SetReport(PluginErrorCode error_code, const std::string& message) {
116 error_code_ = error_code; 116 error_code_ = error_code;
117 message_ = message; 117 message_ = message;
118 } 118 }
119 119
120 PluginErrorCode error_code() const { 120 PluginErrorCode error_code() const {
121 return error_code_; 121 return error_code_;
122 } 122 }
123 123
124 void PrependMessage(const std::string& prefix) { 124 void PrependMessage(const std::string& prefix) {
125 message_ = prefix + message_; 125 message_ = prefix + message_;
126 } 126 }
127 127
128 const std::string& message() const { 128 const std::string& message() const {
129 return message_; 129 return message_;
130 } 130 }
131 131
132 private: 132 private:
133 PluginErrorCode error_code_; 133 PluginErrorCode error_code_;
134 std::string message_; 134 std::string message_;
135 NACL_DISALLOW_COPY_AND_ASSIGN(ErrorInfo); 135 NACL_DISALLOW_COPY_AND_ASSIGN(ErrorInfo);
136 }; 136 };
137 137
138 } // namespace plugin 138 } // namespace plugin
139 139
140 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_ERROR_H 140 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_ERROR_H
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.cc ('k') | ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698