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

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

Issue 115412: Fix Skia includes to use the whole path name. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/renderer/renderer_glue.cc ('k') | skia/ext/SkMemory_new_handler.cpp » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/gfx/jpeg_codec.h" 12 #include "base/gfx/jpeg_codec.h"
13 #include "base/icu_util.h" 13 #include "base/icu_util.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/process_util.h" 16 #include "base/process_util.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "chrome/browser/history/history.h" 19 #include "chrome/browser/history/history.h"
20 #include "chrome/common/thumbnail_score.h" 20 #include "chrome/common/thumbnail_score.h"
21 #include "SkBitmap.h" 21 #include "third_party/skia/include/core/SkBitmap.h"
22 22
23 using base::Time; 23 using base::Time;
24 24
25 // Probabilities of different word lengths, as measured from Darin's profile. 25 // Probabilities of different word lengths, as measured from Darin's profile.
26 // kWordLengthProbabilities[n-1] = P(word of length n) 26 // kWordLengthProbabilities[n-1] = P(word of length n)
27 const float kWordLengthProbabilities[] = { 0.069f, 0.132f, 0.199f, 27 const float kWordLengthProbabilities[] = { 0.069f, 0.132f, 0.199f,
28 0.137f, 0.088f, 0.115f, 0.081f, 0.055f, 0.034f, 0.021f, 0.019f, 0.018f, 28 0.137f, 0.088f, 0.115f, 0.081f, 0.055f, 0.034f, 0.021f, 0.019f, 0.018f,
29 0.007f, 0.007f, 0.005f, 0.004f, 0.003f, 0.003f, 0.003f }; 29 0.007f, 0.007f, 0.005f, 0.004f, 0.003f, 0.003f, 0.003f };
30 30
31 // Return a float uniformly in [0,1]. 31 // Return a float uniformly in [0,1].
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 const int kBatchSize = 2000; 212 const int kBatchSize = 2000;
213 int page_id = 0; 213 int page_id = 0;
214 while (page_id < url_count) { 214 while (page_id < url_count) {
215 const int batch_size = std::min(kBatchSize, url_count - page_id); 215 const int batch_size = std::min(kBatchSize, url_count - page_id);
216 InsertURLBatch(profile_dir, page_id, batch_size, history_only); 216 InsertURLBatch(profile_dir, page_id, batch_size, history_only);
217 page_id += batch_size; 217 page_id += batch_size;
218 } 218 }
219 219
220 return 0; 220 return 0;
221 } 221 }
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | skia/ext/SkMemory_new_handler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698