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

Side by Side Diff: chrome/browser/visitedlink_perftest.cc

Issue 18499: Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII(""). (Closed)
Patch Set: Created 11 years, 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 21 matching lines...) Expand all
32 32
33 // we have no slaves, so this broadcase is a NOP 33 // we have no slaves, so this broadcase is a NOP
34 VisitedLinkMaster::PostNewTableEvent DummyBroadcastNewTableEvent; 34 VisitedLinkMaster::PostNewTableEvent DummyBroadcastNewTableEvent;
35 void DummyBroadcastNewTableEvent(base::SharedMemory *table) { 35 void DummyBroadcastNewTableEvent(base::SharedMemory *table) {
36 } 36 }
37 37
38 // Call at the beginning of the test to retrieve the database name. 38 // Call at the beginning of the test to retrieve the database name.
39 void InitDBName(std::wstring* db_name) { 39 void InitDBName(std::wstring* db_name) {
40 FilePath db_path; 40 FilePath db_path;
41 ASSERT_TRUE(file_util::GetCurrentDirectory(&db_path)); 41 ASSERT_TRUE(file_util::GetCurrentDirectory(&db_path));
42 db_path = db_path.Append(FILE_PATH_LITERAL("TempVisitedLinks")); 42 db_path = db_path.AppendASCII("TempVisitedLinks");
43 *db_name = db_path.ToWStringHack(); 43 *db_name = db_path.ToWStringHack();
44 } 44 }
45 45
46 // this checks IsVisited for the URLs starting with the given prefix and 46 // this checks IsVisited for the URLs starting with the given prefix and
47 // within the given range 47 // within the given range
48 void CheckVisited(VisitedLinkMaster& master, const char* prefix, 48 void CheckVisited(VisitedLinkMaster& master, const char* prefix,
49 int begin, int end) { 49 int begin, int end) {
50 for (int i = begin; i < end; i++) 50 for (int i = begin; i < end; i++)
51 master.IsVisited(TestURL(prefix, i)); 51 master.IsVisited(TestURL(prefix, i));
52 } 52 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 for (int i = 0; i < static_cast<int>(cold_load_times.size()); i++) { 184 for (int i = 0; i < static_cast<int>(cold_load_times.size()); i++) {
185 cold_sum += cold_load_times[i]; 185 cold_sum += cold_load_times[i];
186 hot_sum += hot_load_times[i]; 186 hot_sum += hot_load_times[i];
187 } 187 }
188 LogPerfResult("Visited_link_cold_load_time", 188 LogPerfResult("Visited_link_cold_load_time",
189 cold_sum / cold_load_times.size(), "ms"); 189 cold_sum / cold_load_times.size(), "ms");
190 LogPerfResult("Visited_link_hot_load_time", 190 LogPerfResult("Visited_link_hot_load_time",
191 hot_sum / hot_load_times.size(), "ms"); 191 hot_sum / hot_load_times.size(), "ms");
192 } 192 }
193 193
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore_uitest.cc ('k') | chrome/common/chrome_plugin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698