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

Side by Side Diff: chrome/tools/profiles/generate_profile.cc

Issue 7618037: base: Rename FileEnumerator::FILE_TYPE to FileEnumerator::FileType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 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 // This program generates a user profile and history by randomly generating 5 // This program generates a user profile and history by randomly generating
6 // data and feeding it to the history service. 6 // data and feeding it to the history service.
7 7
8 #include "chrome/tools/profiles/thumbnail-inl.h" 8 #include "chrome/tools/profiles/thumbnail-inl.h"
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 printf("Writing to disk\n"); 260 printf("Writing to disk\n");
261 261
262 profile.DestroyTopSites(); 262 profile.DestroyTopSites();
263 profile.DestroyHistoryService(); 263 profile.DestroyHistoryService();
264 264
265 message_loop.RunAllPending(); 265 message_loop.RunAllPending();
266 266
267 file_util::FileEnumerator file_iterator( 267 file_util::FileEnumerator file_iterator(
268 profile.GetPath(), false, 268 profile.GetPath(), false,
269 static_cast<file_util::FileEnumerator::FILE_TYPE>( 269 static_cast<file_util::FileEnumerator::FileType>(
270 file_util::FileEnumerator::FILES)); 270 file_util::FileEnumerator::FILES));
271 FilePath path = file_iterator.Next(); 271 FilePath path = file_iterator.Next();
272 while (!path.empty()) { 272 while (!path.empty()) {
273 FilePath dst_file = dst_dir.Append(path.BaseName()); 273 FilePath dst_file = dst_dir.Append(path.BaseName());
274 file_util::Delete(dst_file, false); 274 file_util::Delete(dst_file, false);
275 printf("Copying file %ls to %ls\n", path.value().c_str(), 275 printf("Copying file %ls to %ls\n", path.value().c_str(),
276 dst_file.value().c_str()); 276 dst_file.value().c_str());
277 if (!file_util::CopyFile(path, dst_file)) { 277 if (!file_util::CopyFile(path, dst_file)) {
278 printf("Copying file failed: %d\n", ::GetLastError()); 278 printf("Copying file failed: %d\n", ::GetLastError());
279 return -1; 279 return -1;
280 } 280 }
281 path = file_iterator.Next(); 281 path = file_iterator.Next();
282 } 282 }
283 283
284 return 0; 284 return 0;
285 } 285 }
OLDNEW
« no previous file with comments | « chrome/installer/util/duplicate_tree_detector.cc ('k') | content/browser/renderer_host/pepper_file_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698