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

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

Issue 5676004: Cleanup: Remove unneeded browser_thread.h usage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix deps Created 10 years 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/tools/DEPS ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/app_paths.h" 10 #include "app/app_paths.h"
11 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
12 #include "base/at_exit.h" 12 #include "base/at_exit.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/i18n/icu_util.h" 16 #include "base/i18n/icu_util.h"
17 #include "base/message_loop.h" 17 #include "base/message_loop.h"
18 #include "base/path_service.h" 18 #include "base/path_service.h"
19 #include "base/process_util.h" 19 #include "base/process_util.h"
20 #include "base/string_number_conversions.h" 20 #include "base/string_number_conversions.h"
21 #include "base/utf_string_conversions.h"
22 #include "base/time.h" 21 #include "base/time.h"
23 #include "base/utf_string_conversions.h" 22 #include "base/utf_string_conversions.h"
24 #include "base/win_util.h" 23 #include "base/win_util.h"
24 #include "chrome/browser/browser_thread.h"
Lei Zhang 2010/12/11 00:20:36 This tripped check_deps.py, so I modified chrome/t
25 #include "chrome/browser/history/history.h" 25 #include "chrome/browser/history/history.h"
26 #include "chrome/browser/history/top_sites.h" 26 #include "chrome/browser/history/top_sites.h"
27 #include "chrome/common/chrome_paths.h" 27 #include "chrome/common/chrome_paths.h"
28 #include "chrome/test/testing_profile.h" 28 #include "chrome/test/testing_profile.h"
29 #include "chrome/common/thumbnail_score.h" 29 #include "chrome/common/thumbnail_score.h"
30 #include "chrome/common/notification_service.h" 30 #include "chrome/common/notification_service.h"
31 #include "gfx/codec/jpeg_codec.h" 31 #include "gfx/codec/jpeg_codec.h"
32 #include "third_party/skia/include/core/SkBitmap.h" 32 #include "third_party/skia/include/core/SkBitmap.h"
33 33
34 using base::Time; 34 using base::Time;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (!str.empty()) 87 if (!str.empty())
88 str += L' '; 88 str += L' ';
89 str += RandomWord(); 89 str += RandomWord();
90 } 90 }
91 return str; 91 return str;
92 } 92 }
93 93
94 // Return a random URL-looking string. 94 // Return a random URL-looking string.
95 GURL ConstructRandomURL() { 95 GURL ConstructRandomURL() {
96 return GURL(std::wstring(L"http://") + RandomChars(3) + L".com/" + 96 return GURL(std::wstring(L"http://") + RandomChars(3) + L".com/" +
97 RandomChars(RandomInt(5,20))); 97 RandomChars(RandomInt(5, 20)));
98 } 98 }
99 99
100 // Return a random page title-looking string. 100 // Return a random page title-looking string.
101 std::wstring ConstructRandomTitle() { 101 std::wstring ConstructRandomTitle() {
102 return RandomWords(RandomInt(3, 15)); 102 return RandomWords(RandomInt(3, 15));
103 } 103 }
104 104
105 // Return a random string that could function as page contents. 105 // Return a random string that could function as page contents.
106 std::wstring ConstructRandomPage() { 106 std::wstring ConstructRandomPage() {
107 return RandomWords(RandomInt(10, 4000)); 107 return RandomWords(RandomInt(10, 4000));
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 if (!file_util::CopyFile(path, dst_file)) { 280 if (!file_util::CopyFile(path, dst_file)) {
281 printf("Copying file failed: %ls\n", 281 printf("Copying file failed: %ls\n",
282 win_util::FormatLastWin32Error().c_str()); 282 win_util::FormatLastWin32Error().c_str());
283 return -1; 283 return -1;
284 } 284 }
285 path = file_iterator.Next(); 285 path = file_iterator.Next();
286 } 286 }
287 287
288 return 0; 288 return 0;
289 } 289 }
OLDNEW
« no previous file with comments | « chrome/tools/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698