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

Unified Diff: page_load_test.cc

Issue 10391175: Add alternative path for breakpad dump location. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/chrome/test/reliability/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: page_load_test.cc
===================================================================
--- page_load_test.cc (revision 137530)
+++ page_load_test.cc (working copy)
@@ -36,10 +36,12 @@
#include <vector>
#include "base/command_line.h"
+#include "base/environment.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/file_version_info.h"
#include "base/i18n/time_formatting.h"
+#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
@@ -631,8 +633,16 @@
UITest::SetUp();
g_browser_existing = true;
- // Initialize crash_dumps_dir_path_.
- PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dumps_dir_path_);
+ // If 'BREAKPAD_DUMP_LOCATION' environment variable is set, use it instead.
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::string alternate_minidump_location;
+ if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_minidump_location)) {
+ crash_dumps_dir_path_ = FilePath::FromUTF8Unsafe(
+ alternate_minidump_location);
+ } else {
+ PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dumps_dir_path_);
Paweł Hajdan Jr. 2012/05/17 14:54:45 Wait, shouldn't you modify the PathService code fo
chrisphan1 2012/05/17 18:18:55 DIR_CRASH_DUMPS gets modified in the breakpad at t
Paweł Hajdan Jr. 2012/05/21 08:30:57 Could you explain more? I suggested modifying Path
+ }
+
file_util::FileEnumerator enumerator(crash_dumps_dir_path_,
false, // not recursive
file_util::FileEnumerator::FILES);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698