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

Side by Side Diff: chrome/browser/history/thumbnail_database.cc

Issue 14976003: Histogram versions and extended error codes for SQLite databases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops - need old histograms for continuity. Created 7 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/browser/history/text_database.cc ('k') | chrome/browser/history/top_sites_database.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 #include "chrome/browser/history/thumbnail_database.h" 5 #include "chrome/browser/history/thumbnail_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 db_.RazeAndClose(); 212 db_.RazeAndClose();
213 return sql::INIT_FAILURE; 213 return sql::INIT_FAILURE;
214 } 214 }
215 215
216 return sql::INIT_OK; 216 return sql::INIT_OK;
217 } 217 }
218 218
219 sql::InitStatus ThumbnailDatabase::OpenDatabase(sql::Connection* db, 219 sql::InitStatus ThumbnailDatabase::OpenDatabase(sql::Connection* db,
220 const base::FilePath& db_name) { 220 const base::FilePath& db_name) {
221 db->set_error_histogram_name("Sqlite.Thumbnail.Error"); 221 db->set_histogram_tag("Thumbnail");
222 222
223 // Thumbnails db now only stores favicons, so we don't need that big a page 223 // Thumbnails db now only stores favicons, so we don't need that big a page
224 // size or cache. 224 // size or cache.
225 db->set_page_size(2048); 225 db->set_page_size(2048);
226 db->set_cache_size(32); 226 db->set_cache_size(32);
227 227
228 // Run the database in exclusive mode. Nobody else should be accessing the 228 // Run the database in exclusive mode. Nobody else should be accessing the
229 // database while we're running, and this will give somewhat improved perf. 229 // database while we're running, and this will give somewhat improved perf.
230 db->set_exclusive_locking(); 230 db->set_exclusive_locking();
231 231
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 } 1164 }
1165 parsing_errors |= !base::StringToInt(t.token(), &height); 1165 parsing_errors |= !base::StringToInt(t.token(), &height);
1166 favicon_sizes->push_back(gfx::Size(width, height)); 1166 favicon_sizes->push_back(gfx::Size(width, height));
1167 } 1167 }
1168 1168
1169 if (parsing_errors) 1169 if (parsing_errors)
1170 favicon_sizes->clear(); 1170 favicon_sizes->clear();
1171 } 1171 }
1172 1172
1173 } // namespace history 1173 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/text_database.cc ('k') | chrome/browser/history/top_sites_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698