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

Unified Diff: util/file/basename_win.cc

Issue 1120383003: Get generate_dump compiling on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@tools
Patch Set: fix os type in sysinfo Created 5 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: util/file/basename_win.cc
diff --git a/test/scoped_temp_dir.cc b/util/file/basename_win.cc
similarity index 74%
copy from test/scoped_temp_dir.cc
copy to util/file/basename_win.cc
index 5c151cc0057d69699fe38ed8380c59ca4d336651..1e8e801a96bb7f1fe298b812f6c539c935a96461 100644
--- a/test/scoped_temp_dir.cc
+++ b/util/file/basename_win.cc
@@ -12,17 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "test/scoped_temp_dir.h"
+#include "util/file/basename.h"
namespace crashpad {
-namespace test {
-ScopedTempDir::ScopedTempDir() : path_(CreateTemporaryDirectory()) {
+std::string Basename(const std::string& path) {
+ char fname[_MAX_FNAME];
+ char ext[_MAX_EXT];
+ _splitpath(path.c_str(), nullptr, nullptr, fname, ext);
Mark Mentovai 2015/05/04 21:21:59 Compatibility test between basename() and _splitpa
scottmg 2015/05/05 19:26:22 Deleted.
+ return std::string(fname) + std::string(ext);
}
-ScopedTempDir::~ScopedTempDir() {
- RecursivelyDeleteTemporaryDirectory(path());
-}
-
-} // namespace test
} // namespace crashpad

Powered by Google App Engine
This is Rietveld 408576698