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

Side by Side Diff: chrome/browser/extensions/api/record/record_api.cc

Issue 21150006: Introduce --cancel-first-run and reduce the strength of --no-first-run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add first_run::IsFirstRunSuppressed() Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/record/record_api.h" 5 #include "chrome/browser/extensions/api/record/record_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 remove_switches.push_back(switches::kPlaybackMode); 98 remove_switches.push_back(switches::kPlaybackMode);
99 remove_switches.push_back(switches::kRecordStats); 99 remove_switches.push_back(switches::kRecordStats);
100 remove_switches.push_back(switches::kLoadExtension); 100 remove_switches.push_back(switches::kLoadExtension);
101 101
102 CommandLine line = RemoveSwitches(base_command_line_, remove_switches); 102 CommandLine line = RemoveSwitches(base_command_line_, remove_switches);
103 103
104 // Add the user-data-dir switch, since this is common to both call types. 104 // Add the user-data-dir switch, since this is common to both call types.
105 line.AppendSwitchPath(switches::kUserDataDir, user_data_dir_); 105 line.AppendSwitchPath(switches::kUserDataDir, user_data_dir_);
106 106
107 // Test browsers must run as if they are not in first-run mode 107 // Test browsers must run as if they are not in first-run mode
108 line.AppendSwitch(switches::kNoFirstRun); 108 line.AppendSwitch(switches::kSkipFirstRun);
109 109
110 // Create and fill a temp file to communicate the URL list to the test 110 // Create and fill a temp file to communicate the URL list to the test
111 // browser. 111 // browser.
112 base::FilePath url_path; 112 base::FilePath url_path;
113 file_util::CreateTemporaryFile(&url_path); 113 file_util::CreateTemporaryFile(&url_path);
114 file_util::WriteFile(url_path, url_contents_.c_str(), url_contents_.size()); 114 file_util::WriteFile(url_path, url_contents_.c_str(), url_contents_.size());
115 line.AppendSwitchPath(switches::kVisitURLs, url_path); 115 line.AppendSwitchPath(switches::kVisitURLs, url_path);
116 116
117 // Set up Capture- or Replay-specific commandline switches. 117 // Set up Capture- or Replay-specific commandline switches.
118 AddSwitches(&line); 118 AddSwitches(&line);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 result.run_time = run_time_ms_; 253 result.run_time = run_time_ms_;
254 result.stats = stats_; 254 result.stats = stats_;
255 result.errors = errors_; 255 result.errors = errors_;
256 256
257 results_ = record::ReplayURLs::Results::Create(result); 257 results_ = record::ReplayURLs::Results::Create(result);
258 SendResponse(true); 258 SendResponse(true);
259 } 259 }
260 260
261 } // namespace extensions 261 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698