| 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..99a7e3b125c2c13335f16b66618080676f62abd6 100644
|
| --- a/chrome/browser/extensions/api/record/record_api.cc
|
| +++ b/chrome/browser/extensions/api/record/record_api.cc
|
| @@ -167,7 +167,9 @@ bool CaptureURLsFunction::ParseJSParameters() {
|
| EXTENSION_FUNCTION_VALIDATE(params.get());
|
|
|
| url_contents_ = JoinString(params->urls, '\n');
|
| - user_data_dir_ = FilePath::FromUTF8Unsafe(params->cache_directory_path);
|
| + // TODO(cstaley): Can't just use captureName -- gotta stick it in a temp dir.
|
| + // TODO(cstaley): Ensure that capture name is suitable as directory name.
|
| + user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_name);
|
|
|
| return true;
|
| }
|
| @@ -184,7 +186,6 @@ void CaptureURLsFunction::Finish() {
|
| 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);
|
| +
|
| + // TODO(cstaley): Must build full temp dir from capture_name
|
| + user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_name);
|
| +
|
| + // TODO(cstaley): 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);
|
| }
|
|
|
|
|