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

Side by Side Diff: chrome/browser/webdata/web_database_unittest.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/browser/webdata/web_data_service.cc ('k') | chrome/common/extensions/extension.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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 if (timestamps1.size() != timestamps2.size()) { 85 if (timestamps1.size() != timestamps2.size()) {
86 return timestamps1.size() < timestamps2.size(); 86 return timestamps1.size() < timestamps2.size();
87 } 87 }
88 88
89 std::set<base::Time>::iterator it; 89 std::set<base::Time>::iterator it;
90 for (it = timestamps1.begin(); it != timestamps1.end(); it++) { 90 for (it = timestamps1.begin(); it != timestamps1.end(); it++) {
91 timestamps2.erase(*it); 91 timestamps2.erase(*it);
92 } 92 }
93 93
94 return timestamps2.size() != 0U; 94 return !timestamps2.empty();
95 } 95 }
96 96
97 void AutoFillProfile31FromStatement(const sql::Statement& s, 97 void AutoFillProfile31FromStatement(const sql::Statement& s,
98 AutoFillProfile* profile, 98 AutoFillProfile* profile,
99 string16* label, 99 string16* label,
100 int* unique_id, 100 int* unique_id,
101 int64* date_modified) { 101 int64* date_modified) {
102 DCHECK(profile); 102 DCHECK(profile);
103 DCHECK(label); 103 DCHECK(label);
104 DCHECK(unique_id); 104 DCHECK(unique_id);
(...skipping 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 3165
3166 // Check that the country code is properly converted. 3166 // Check that the country code is properly converted.
3167 sql::Statement s(connection.GetUniqueStatement( 3167 sql::Statement s(connection.GetUniqueStatement(
3168 "SELECT country_code FROM autofill_profiles")); 3168 "SELECT country_code FROM autofill_profiles"));
3169 3169
3170 ASSERT_TRUE(s.Step()); 3170 ASSERT_TRUE(s.Step());
3171 std::string country_code = s.ColumnString(0); 3171 std::string country_code = s.ColumnString(0);
3172 EXPECT_EQ("US", country_code); 3172 EXPECT_EQ("US", country_code);
3173 } 3173 }
3174 } 3174 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698