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

Side by Side Diff: chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 "base/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/sync/test/integration/autofill_helper.h" 7 #include "chrome/browser/sync/test/integration/autofill_helper.h"
8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
9 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" 9 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 SetProfiles(profile, &autofill_profiles); 97 SetProfiles(profile, &autofill_profiles);
98 } 98 }
99 99
100 void AutofillSyncPerfTest::UpdateProfiles(int profile) { 100 void AutofillSyncPerfTest::UpdateProfiles(int profile) {
101 const std::vector<AutofillProfile*>& all_profiles = 101 const std::vector<AutofillProfile*>& all_profiles =
102 GetAllProfiles(profile); 102 GetAllProfiles(profile);
103 std::vector<AutofillProfile> autofill_profiles; 103 std::vector<AutofillProfile> autofill_profiles;
104 for (size_t i = 0; i < all_profiles.size(); ++i) { 104 for (size_t i = 0; i < all_profiles.size(); ++i) {
105 autofill_profiles.push_back(*all_profiles[i]); 105 autofill_profiles.push_back(*all_profiles[i]);
106 autofill_profiles.back().SetRawInfo(autofill::NAME_FIRST, 106 autofill_profiles.back().SetRawInfo(autofill::NAME_FIRST,
107 UTF8ToUTF16(NextName())); 107 base::UTF8ToUTF16(NextName()));
108 } 108 }
109 SetProfiles(profile, &autofill_profiles); 109 SetProfiles(profile, &autofill_profiles);
110 } 110 }
111 111
112 void AutofillSyncPerfTest::RemoveProfiles(int profile) { 112 void AutofillSyncPerfTest::RemoveProfiles(int profile) {
113 std::vector<AutofillProfile> empty; 113 std::vector<AutofillProfile> empty;
114 SetProfiles(profile, &empty); 114 SetProfiles(profile, &empty);
115 } 115 }
116 116
117 void AutofillSyncPerfTest::AddKeys(int profile, int num_keys) { 117 void AutofillSyncPerfTest::AddKeys(int profile, int num_keys) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 ASSERT_EQ(kNumKeys, GetKeyCount(1)); 201 ASSERT_EQ(kNumKeys, GetKeyCount(1));
202 SyncTimingHelper::PrintResult("autofill", "add_autofill_keys", dt); 202 SyncTimingHelper::PrintResult("autofill", "add_autofill_keys", dt);
203 203
204 RemoveKeys(0); 204 RemoveKeys(0);
205 // TODO(lipalani): fix this. The following line is added to force sync. 205 // TODO(lipalani): fix this. The following line is added to force sync.
206 ForceSync(0); 206 ForceSync(0);
207 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 207 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
208 ASSERT_EQ(0, GetKeyCount(1)); 208 ASSERT_EQ(0, GetKeyCount(1));
209 SyncTimingHelper::PrintResult("autofill", "delete_autofill_keys", dt); 209 SyncTimingHelper::PrintResult("autofill", "delete_autofill_keys", dt);
210 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698