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

Side by Side Diff: chrome/test/perf/generate_profile.cc

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows Created 7 years, 5 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/mini_installer_test/run_all_unittests.cc ('k') | chrome/test/perf/memory_test.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) 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 "chrome/test/perf/generate_profile.h" 5 #include "chrome/test/perf/generate_profile.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 profile.DestroyHistoryService(); 250 profile.DestroyHistoryService();
251 251
252 message_loop.RunUntilIdle(); 252 message_loop.RunUntilIdle();
253 253
254 base::FileEnumerator file_iterator(profile.GetPath(), false, 254 base::FileEnumerator file_iterator(profile.GetPath(), false,
255 base::FileEnumerator::FILES); 255 base::FileEnumerator::FILES);
256 base::FilePath path = file_iterator.Next(); 256 base::FilePath path = file_iterator.Next();
257 while (!path.empty()) { 257 while (!path.empty()) {
258 base::FilePath dst_file = dst_dir.Append(path.BaseName()); 258 base::FilePath dst_file = dst_dir.Append(path.BaseName());
259 base::Delete(dst_file, false); 259 base::Delete(dst_file, false);
260 if (!file_util::CopyFile(path, dst_file)) { 260 if (!base::CopyFile(path, dst_file)) {
261 PLOG(ERROR) << "Copying file failed"; 261 PLOG(ERROR) << "Copying file failed";
262 return false; 262 return false;
263 } 263 }
264 path = file_iterator.Next(); 264 path = file_iterator.Next();
265 } 265 }
266 266
267 printf("Finished creating profiles for testing.\n"); 267 printf("Finished creating profiles for testing.\n");
268 268
269 // Restore the random seed. 269 // Restore the random seed.
270 srand(static_cast<unsigned int>(Time::Now().ToInternalValue())); 270 srand(static_cast<unsigned int>(Time::Now().ToInternalValue()));
271 271
272 return true; 272 return true;
273 } 273 }
OLDNEW
« no previous file with comments | « chrome/test/mini_installer_test/run_all_unittests.cc ('k') | chrome/test/perf/memory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698