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

Side by Side Diff: chromecast/crash/dummy_minidump_generator.cc

Issue 1154383006: Adding crash utilities to chromecast/crash. (Closed) Base URL: https://eureka-internal.googlesource.com/chromium/src@master
Patch Set: Corrected version hack in breakpad_util. Created 5 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chromecast/crash/dummy_minidump_generator.h"
6
7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h"
9 #include "base/logging.h"
10
11 namespace chromecast {
12
13 DummyMinidumpGenerator::DummyMinidumpGenerator(
14 const std::string& existing_minidump_path)
15 : existing_minidump_path_(existing_minidump_path) {
16 }
17
18 bool DummyMinidumpGenerator::Generate(const std::string& minidump_path) {
19 base::FilePath file(existing_minidump_path_);
20 if (!base::PathExists(file)) {
21 LOG(ERROR) << file.value() << " is not a valid file path";
22 return false;
23 }
24
25 LOG(INFO) << "Moving minidump from " << existing_minidump_path_ << " to "
26 << minidump_path << " for further uploading.";
27 // Use stdlib call here to avoid potential IO restrictions on this thread.
28 return (0 == rename(file.value().c_str(),
29 base::FilePath(minidump_path).value().c_str()));
30 }
31
32 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698