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

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

Issue 10270023: Add new ResourceBundle::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/base/chrome_test_suite.cc ('k') | chrome_frame/test/net/fake_external_tab.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 // 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (!file_util::CreateDirectory(dst_dir)) { 227 if (!file_util::CreateDirectory(dst_dir)) {
228 printf("Unable to create directory %ls: %d\n", 228 printf("Unable to create directory %ls: %d\n",
229 dst_dir.value().c_str(), 229 dst_dir.value().c_str(),
230 ::GetLastError()); 230 ::GetLastError());
231 } 231 }
232 232
233 icu_util::Initialize(); 233 icu_util::Initialize();
234 234
235 chrome::RegisterPathProvider(); 235 chrome::RegisterPathProvider();
236 ui::RegisterPathProvider(); 236 ui::RegisterPathProvider();
237 ResourceBundle::InitSharedInstanceWithLocale("en-US"); 237 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
238 scoped_ptr<content::NotificationService> notification_service( 238 scoped_ptr<content::NotificationService> notification_service(
239 content::NotificationService::Create()); 239 content::NotificationService::Create());
240 MessageLoopForUI message_loop; 240 MessageLoopForUI message_loop;
241 content::BrowserThreadImpl ui_thread(BrowserThread::UI, &message_loop); 241 content::BrowserThreadImpl ui_thread(BrowserThread::UI, &message_loop);
242 content::BrowserThreadImpl db_thread(BrowserThread::DB, &message_loop); 242 content::BrowserThreadImpl db_thread(BrowserThread::DB, &message_loop);
243 TestingProfile profile; 243 TestingProfile profile;
244 profile.CreateHistoryService(false, false); 244 profile.CreateHistoryService(false, false);
245 if (types & TOP_SITES) { 245 if (types & TOP_SITES) {
246 profile.CreateTopSites(); 246 profile.CreateTopSites();
247 profile.BlockUntilTopSitesLoaded(); 247 profile.BlockUntilTopSitesLoaded();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 dst_file.value().c_str()); 279 dst_file.value().c_str());
280 if (!file_util::CopyFile(path, dst_file)) { 280 if (!file_util::CopyFile(path, dst_file)) {
281 printf("Copying file failed: %d\n", ::GetLastError()); 281 printf("Copying file failed: %d\n", ::GetLastError());
282 return -1; 282 return -1;
283 } 283 }
284 path = file_iterator.Next(); 284 path = file_iterator.Next();
285 } 285 }
286 286
287 return 0; 287 return 0;
288 } 288 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_suite.cc ('k') | chrome_frame/test/net/fake_external_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698