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..ac645ea42f243be720c0dad7f74f83d3e77298e9 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,8 @@ 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((double)run_time_ms_, stats_, |
Jeffrey Yasskin
2012/08/17 19:32:14
In C++, ints implicitly convert to doubles, so you
clintstaley
2012/08/20 23:17:06
Done.
|
+ errors_); |
SendResponse(true); |
} |