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

Side by Side Diff: chrome_frame/crash_reporting/minidump_test.cc

Issue 99923002: Move temp file functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <dbghelp.h> 6 #include <dbghelp.h>
7 #include <objbase.h> 7 #include <objbase.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual void SetUp() { 50 virtual void SetUp() {
51 // Make sure URLMon isn't loaded into our process. 51 // Make sure URLMon isn't loaded into our process.
52 ASSERT_EQ(NULL, ::GetModuleHandle(L"urlmon.dll")); 52 ASSERT_EQ(NULL, ::GetModuleHandle(L"urlmon.dll"));
53 53
54 // Then load and unload it to ensure we have something to 54 // Then load and unload it to ensure we have something to
55 // stock the unloaded module list with. 55 // stock the unloaded module list with.
56 HMODULE urlmon = ::LoadLibrary(L"urlmon.dll"); 56 HMODULE urlmon = ::LoadLibrary(L"urlmon.dll");
57 ASSERT_TRUE(urlmon != NULL); 57 ASSERT_TRUE(urlmon != NULL);
58 ASSERT_TRUE(::FreeLibrary(urlmon)); 58 ASSERT_TRUE(::FreeLibrary(urlmon));
59 59
60 ASSERT_TRUE(file_util::CreateTemporaryFile(&dump_file_)); 60 ASSERT_TRUE(base::CreateTemporaryFile(&dump_file_));
61 dump_file_handle_.Set(::CreateFile(dump_file_.value().c_str(), 61 dump_file_handle_.Set(::CreateFile(dump_file_.value().c_str(),
62 GENERIC_WRITE | GENERIC_READ, 62 GENERIC_WRITE | GENERIC_READ,
63 0, 63 0,
64 NULL, 64 NULL,
65 OPEN_EXISTING, 65 OPEN_EXISTING,
66 0, 66 0,
67 NULL)); 67 NULL));
68 ASSERT_TRUE(dump_file_handle_.IsValid()); 68 ASSERT_TRUE(dump_file_handle_.IsValid());
69 } 69 }
70 70
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 testing::InitGoogleTest(&argc, argv); 434 testing::InitGoogleTest(&argc, argv);
435 CommandLine::Init(argc, argv); 435 CommandLine::Init(argc, argv);
436 436
437 logging::LoggingSettings settings; 437 logging::LoggingSettings settings;
438 settings.logging_dest = logging::LOG_TO_ALL; 438 settings.logging_dest = logging::LOG_TO_ALL;
439 settings.log_file = L"CON"; 439 settings.log_file = L"CON";
440 settings.lock_log = logging::DONT_LOCK_LOG_FILE; 440 settings.lock_log = logging::DONT_LOCK_LOG_FILE;
441 logging::InitLogging(settings); 441 logging::InitLogging(settings);
442 return RUN_ALL_TESTS(); 442 return RUN_ALL_TESTS();
443 } 443 }
OLDNEW
« no previous file with comments | « chrome/utility/media_galleries/pmp_column_reader_unittest.cc ('k') | chrome_frame/test/navigation_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698