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

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

Issue 18838: Try2 of issue 18772. (move jpeg_codec* to base/gfx) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/unit/unittests.vcproj ('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) 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/gfx/jpeg_codec.h"
11 #include "base/icu_util.h" 12 #include "base/icu_util.h"
12 #include "base/message_loop.h" 13 #include "base/message_loop.h"
13 #include "base/path_service.h" 14 #include "base/path_service.h"
14 #include "base/process_util.h" 15 #include "base/process_util.h"
15 #include "base/string_util.h" 16 #include "base/string_util.h"
16 #include "base/time.h" 17 #include "base/time.h"
17 #include "chrome/browser/history/history.h" 18 #include "chrome/browser/history/history.h"
18 #include "chrome/common/jpeg_codec.h"
19 #include "chrome/common/thumbnail_score.h" 19 #include "chrome/common/thumbnail_score.h"
20 #include "SkBitmap.h" 20 #include "SkBitmap.h"
21 21
22 using base::Time; 22 using base::Time;
23 23
24 // Probabilities of different word lengths, as measured from Darin's profile. 24 // Probabilities of different word lengths, as measured from Darin's profile.
25 // kWordLengthProbabilities[n-1] = P(word of length n) 25 // kWordLengthProbabilities[n-1] = P(word of length n)
26 const float kWordLengthProbabilities[] = { 0.069f, 0.132f, 0.199f, 26 const float kWordLengthProbabilities[] = { 0.069f, 0.132f, 0.199f,
27 0.137f, 0.088f, 0.115f, 0.081f, 0.055f, 0.034f, 0.021f, 0.019f, 0.018f, 27 0.137f, 0.088f, 0.115f, 0.081f, 0.055f, 0.034f, 0.021f, 0.019f, 0.018f,
28 0.007f, 0.007f, 0.005f, 0.004f, 0.003f, 0.003f, 0.003f }; 28 0.007f, 0.007f, 0.005f, 0.004f, 0.003f, 0.003f, 0.003f };
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 const int kBatchSize = 2000; 211 const int kBatchSize = 2000;
212 int page_id = 0; 212 int page_id = 0;
213 while (page_id < url_count) { 213 while (page_id < url_count) {
214 const int batch_size = std::min(kBatchSize, url_count - page_id); 214 const int batch_size = std::min(kBatchSize, url_count - page_id);
215 InsertURLBatch(profile_dir, page_id, batch_size, history_only); 215 InsertURLBatch(profile_dir, page_id, batch_size, history_only);
216 page_id += batch_size; 216 page_id += batch_size;
217 } 217 }
218 218
219 return 0; 219 return 0;
220 } 220 }
OLDNEW
« no previous file with comments | « chrome/test/unit/unittests.vcproj ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698