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

Unified Diff: third_party/crashpad/crashpad/util/misc/paths_win.cc

Issue 2804713002: Update Crashpad to b4095401639ebe2ad33169e5c1d994065cbff1b8 (Closed)
Patch Set: Created 3 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: third_party/crashpad/crashpad/util/misc/paths_win.cc
diff --git a/third_party/crashpad/crashpad/test/paths_win.cc b/third_party/crashpad/crashpad/util/misc/paths_win.cc
similarity index 72%
rename from third_party/crashpad/crashpad/test/paths_win.cc
rename to third_party/crashpad/crashpad/util/misc/paths_win.cc
index 947acd5cce951ca54d4aff8582877eb98a0489fa..4c402fe9085c8a98e27aa8c91f34755c8d5f2b4d 100644
--- a/third_party/crashpad/crashpad/test/paths_win.cc
+++ b/third_party/crashpad/crashpad/util/misc/paths_win.cc
@@ -12,23 +12,29 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "test/paths.h"
+#include "util/misc/paths.h"
#include <windows.h>
#include "base/logging.h"
namespace crashpad {
-namespace test {
// static
-base::FilePath Paths::Executable() {
+bool Paths::Executable(base::FilePath* path) {
wchar_t executable_path[_MAX_PATH];
unsigned int len =
GetModuleFileName(nullptr, executable_path, arraysize(executable_path));
- PCHECK(len != 0 && len < arraysize(executable_path)) << "GetModuleFileName";
- return base::FilePath(executable_path);
+ if (len == 0) {
+ PLOG(ERROR) << "GetModuleFileName";
+ return false;
+ } else if (len >= arraysize(executable_path)) {
+ LOG(ERROR) << "GetModuleFileName";
+ return false;
+ }
+
+ *path = base::FilePath(executable_path);
+ return true;
}
-} // namespace test
} // namespace crashpad
« no previous file with comments | « third_party/crashpad/crashpad/util/misc/paths_test.cc ('k') | third_party/crashpad/crashpad/util/misc/random_string_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698