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

Side by Side Diff: chrome/test/url_fetch_test/url_fetch_test.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome/tools/crash_service/crash_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 cookie_value.length() > 0 ? cookie_value.c_str() : NULL, 170 cookie_value.length() > 0 ? cookie_value.c_str() : NULL,
171 jsvar.length() > 0 ? jsvar.c_str() : NULL, 171 jsvar.length() > 0 ? jsvar.c_str() : NULL,
172 js_expr, 172 js_expr,
173 js_frame_xpath, 173 js_frame_xpath,
174 js_timeout_ms, 174 js_timeout_ms,
175 &result); 175 &result);
176 176
177 // Write out the cookie if requested 177 // Write out the cookie if requested
178 FilePath cookie_output_path = 178 FilePath cookie_output_path =
179 cmd_line->GetSwitchValuePath("wait_cookie_output"); 179 cmd_line->GetSwitchValuePath("wait_cookie_output");
180 if (cookie_output_path.value().size() > 0) { 180 if (!cookie_output_path.value().empty()) {
181 ASSERT_TRUE(WriteValueToFile(result.cookie_value, cookie_output_path)); 181 ASSERT_TRUE(WriteValueToFile(result.cookie_value, cookie_output_path));
182 } 182 }
183 183
184 // Write out the JS Variable if requested 184 // Write out the JS Variable if requested
185 FilePath jsvar_output_path = cmd_line->GetSwitchValuePath("jsvar_output"); 185 FilePath jsvar_output_path = cmd_line->GetSwitchValuePath("jsvar_output");
186 if (jsvar_output_path.value().size() > 0) { 186 if (!jsvar_output_path.value().empty()) {
187 ASSERT_TRUE(WriteValueToFile(result.javascript_variable, 187 ASSERT_TRUE(WriteValueToFile(result.javascript_variable,
188 jsvar_output_path)); 188 jsvar_output_path));
189 } 189 }
190 } 190 }
191 191
192 } // namespace 192 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome/tools/crash_service/crash_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698