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

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

Issue 584013002: Componentize history_types.{cc,h} and android_history_types.{cc,h} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
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/download_database.h" 5 #include "chrome/browser/history/download_database.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/debug/alias.h" 11 #include "base/debug/alias.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "chrome/browser/history/download_row.h" 20 #include "chrome/browser/history/download_row.h"
21 #include "chrome/browser/history/history_types.h" 21 #include "components/history/core/browser/history_types.h"
22 #include "content/public/browser/download_interrupt_reasons.h" 22 #include "content/public/browser/download_interrupt_reasons.h"
23 #include "content/public/browser/download_item.h" 23 #include "content/public/browser/download_item.h"
24 #include "sql/statement.h" 24 #include "sql/statement.h"
25 25
26 using content::DownloadItem; 26 using content::DownloadItem;
27 27
28 namespace history { 28 namespace history {
29 29
30 namespace { 30 namespace {
31 31
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 size_t DownloadDatabase::CountDownloads() { 662 size_t DownloadDatabase::CountDownloads() {
663 EnsureInProgressEntriesCleanedUp(); 663 EnsureInProgressEntriesCleanedUp();
664 664
665 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE, 665 sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
666 "SELECT count(*) from downloads")); 666 "SELECT count(*) from downloads"));
667 statement.Step(); 667 statement.Step();
668 return statement.ColumnInt(0); 668 return statement.ColumnInt(0);
669 } 669 }
670 670
671 } // namespace history 671 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor_unittest.cc ('k') | chrome/browser/history/expire_history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698