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

Unified Diff: chrome/browser/extensions/api/record/record_api.cc

Issue 10832191: Major revision of page cycler UI. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Next round of fixes, per jyasskin's comments Created 8 years, 4 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 | chrome/common/extensions/api/experimental_record.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | chrome/common/extensions/api/experimental_record.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698