Index: chrome/browser/extensions/api/record/record_api.cc |
diff --git a/chrome/browser/extensions/api/record/record_api.cc b/chrome/browser/extensions/api/record/record_api.cc |
index 7ff70a8af31d39f1511a2af7e99392906d06e922..c7df733eda16393341d36384467186f4b26a0679 100644 |
--- a/chrome/browser/extensions/api/record/record_api.cc |
+++ b/chrome/browser/extensions/api/record/record_api.cc |
@@ -53,7 +53,7 @@ bool RunPageCyclerFunction::RunImpl() { |
// parameter parsing) then return a list of such errors, else perform |
// RunTestBrowser on the BlockingPool. |
if (!errors_.empty()) { |
- results_ = record::CaptureURLs::Results::Create(errors_); |
+ results_ = record::CaptureURLs::Results::Create(errors_, "FIX_ME"); |
SendResponse(true); |
} else { |
content::BrowserThread::PostBlockingPoolTask(FROM_HERE, |
@@ -167,7 +167,8 @@ bool CaptureURLsFunction::ParseJSParameters() { |
EXTENSION_FUNCTION_VALIDATE(params.get()); |
url_contents_ = JoinString(params->urls, '\n'); |
- user_data_dir_ = FilePath::FromUTF8Unsafe(params->cache_directory_path); |
+ // FIX: Can't just use captureName -- gotta stick it in a temp dir |
Jeffrey Yasskin
2012/08/09 19:27:04
I believe it's more common to use TODO(yourname) i
clintstaley
2012/08/10 00:33:13
Done.
|
+ user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_name); |
Jeffrey Yasskin
2012/08/09 19:27:04
What happens if the user's filesystem doesn't use
clintstaley
2012/08/10 00:33:13
Good point. I think we probably just need to be s
|
return true; |
} |
@@ -180,11 +181,11 @@ void CaptureURLsFunction::AddSwitches(CommandLine* line) { |
} |
void CaptureURLsFunction::Finish() { |
- results_ = record::CaptureURLs::Results::Create(errors_); |
+ results_ = record::CaptureURLs::Results::Create(errors_, |
+ user_data_dir_.AsUTF8Unsafe()); |
SendResponse(true); |
} |
- |
// ReplayURLsFunction ------------------------------------------------ |
ReplayURLsFunction::ReplayURLsFunction() |
@@ -205,8 +206,13 @@ bool ReplayURLsFunction::ParseJSParameters() { |
record::ReplayURLs::Params::Create(*args_)); |
EXTENSION_FUNCTION_VALIDATE(params.get()); |
- url_contents_ = JoinString(params->urls, '\n'); |
- user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_directory_path); |
+ |
+ // FIX: Must build full temp dir from capture_name |
+ user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_name); |
+ |
+ // FIX: Get this from user data dir ultimately |
+ url_contents_ = "http://www.google.com\nhttp://www.amazon.com\n"; |
+ |
repeat_count_ = params->repeat_count; |
if (params->details.get()) { |
@@ -241,13 +247,7 @@ void ReplayURLsFunction::ReadReplyFiles() { |
} |
void ReplayURLsFunction::Finish() { |
- record::ReplayURLsResult result; |
- |
- result.run_time = run_time_ms_; |
- result.stats = stats_; |
- result.errors = errors_; |
- |
- results_ = record::ReplayURLs::Results::Create(result); |
+ results_ = record::ReplayURLs::Results::Create(run_time_ms_, stats_, errors_); |
SendResponse(true); |
} |