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

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

Issue 10855002: Change the type of file_type parameter to int, as the parameter actually takes or-ed bitmasks, (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 // 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 printf("Writing to disk\n"); 264 printf("Writing to disk\n");
265 265
266 profile.DestroyTopSites(); 266 profile.DestroyTopSites();
267 profile.DestroyHistoryService(); 267 profile.DestroyHistoryService();
268 268
269 message_loop.RunAllPending(); 269 message_loop.RunAllPending();
270 270
271 file_util::FileEnumerator file_iterator( 271 file_util::FileEnumerator file_iterator(
272 profile.GetPath(), false, 272 profile.GetPath(), false,
jar (doing other things) 2012/08/06 18:27:02 nit: push line 272 onto the end of line 271.
Haruki Sato 2012/08/06 23:22:18 Done.
273 static_cast<file_util::FileEnumerator::FileType>( 273 file_util::FileEnumerator::FILES);
274 file_util::FileEnumerator::FILES));
275 FilePath path = file_iterator.Next(); 274 FilePath path = file_iterator.Next();
276 while (!path.empty()) { 275 while (!path.empty()) {
277 FilePath dst_file = dst_dir.Append(path.BaseName()); 276 FilePath dst_file = dst_dir.Append(path.BaseName());
278 file_util::Delete(dst_file, false); 277 file_util::Delete(dst_file, false);
279 printf("Copying file %ls to %ls\n", path.value().c_str(), 278 printf("Copying file %ls to %ls\n", path.value().c_str(),
280 dst_file.value().c_str()); 279 dst_file.value().c_str());
281 if (!file_util::CopyFile(path, dst_file)) { 280 if (!file_util::CopyFile(path, dst_file)) {
282 printf("Copying file failed: %d\n", ::GetLastError()); 281 printf("Copying file failed: %d\n", ::GetLastError());
283 return -1; 282 return -1;
284 } 283 }
285 path = file_iterator.Next(); 284 path = file_iterator.Next();
286 } 285 }
287 286
288 return 0; 287 return 0;
289 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698