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

Side by Side Diff: chrome/browser/apps/ephemeral_app_service_unittest.cc

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/bookmark_provider_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 6
7 #include "base/rand_util.h" 7 #include "base/rand_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/apps/ephemeral_app_service.h" 10 #include "chrome/browser/apps/ephemeral_app_service.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Generate X app launch times, N days before the reference time. 88 // Generate X app launch times, N days before the reference time.
89 // If |generated_ids| is not NULL, the generated app IDs will be added 89 // If |generated_ids| is not NULL, the generated app IDs will be added
90 // to the set. 90 // to the set.
91 void GenerateLaunchTimes(const base::Time& reference_time, 91 void GenerateLaunchTimes(const base::Time& reference_time,
92 int days_before, 92 int days_before,
93 int count, 93 int count,
94 LaunchTimeAppMap* launch_times, 94 LaunchTimeAppMap* launch_times,
95 std::set<std::string>* generated_ids = NULL) { 95 std::set<std::string>* generated_ids = NULL) {
96 for (int i = 0; i < count; ++i) { 96 for (int i = 0; i < count; ++i) {
97 std::string app_id = base::IntToString(launch_times->size()); 97 std::string app_id = base::SizeTToString(launch_times->size());
98 launch_times->insert(std::make_pair( 98 launch_times->insert(std::make_pair(
99 GetPastTime(reference_time, days_before, true), 99 GetPastTime(reference_time, days_before, true),
100 app_id)); 100 app_id));
101 101
102 if (generated_ids) 102 if (generated_ids)
103 generated_ids->insert(app_id); 103 generated_ids->insert(app_id);
104 } 104 }
105 } 105 }
106 106
107 // Add inactive apps that should always be removed by garbage collection. 107 // Add inactive apps that should always be removed by garbage collection.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 const int kRunningApps = 3; 257 const int kRunningApps = 3;
258 AddIntermediateApps( 258 AddIntermediateApps(
259 time_now, 259 time_now,
260 EphemeralAppService::kMaxEphemeralAppsCount, 260 EphemeralAppService::kMaxEphemeralAppsCount,
261 &launch_times); // overflow 261 &launch_times); // overflow
262 RunTestCheckLRU( 262 RunTestCheckLRU(
263 launch_times.size() + kRunningApps, 263 launch_times.size() + kRunningApps,
264 launch_times, 264 launch_times,
265 kRunningApps); 265 kRunningApps);
266 } 266 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/bookmark_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698