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

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

Issue 2934004: Try to cut down Browser/TabContents header dependencies. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix unit tests compile Created 10 years, 5 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
« no previous file with comments | « chrome/browser/history/history_types.cc ('k') | chrome/browser/omnibox_search_hint.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/visit_database.h" 5 #include "chrome/browser/history/visit_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 11
12 #include "app/sql/connection.h" 12 #include "app/sql/connection.h"
13 #include "app/sql/statement.h" 13 #include "app/sql/statement.h"
14 #include "base/logging.h"
14 #include "chrome/browser/history/url_database.h" 15 #include "chrome/browser/history/url_database.h"
15 #include "chrome/common/page_transition_types.h" 16 #include "chrome/common/page_transition_types.h"
16 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
17 18
18 // Rows, in order, of the visit table. 19 // Rows, in order, of the visit table.
19 #define HISTORY_VISIT_ROW_FIELDS \ 20 #define HISTORY_VISIT_ROW_FIELDS \
20 " id,url,visit_time,from_visit,transition,segment_id,is_indexed " 21 " id,url,visit_time,from_visit,transition,segment_id,is_indexed "
21 22
22 namespace history { 23 namespace history {
23 24
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 "SELECT MIN(visit_time) FROM visits WHERE visit_time != 0")); 431 "SELECT MIN(visit_time) FROM visits WHERE visit_time != 0"));
431 if (!statement || !statement.Step() || statement.ColumnInt64(0) == 0) { 432 if (!statement || !statement.Step() || statement.ColumnInt64(0) == 0) {
432 *first_visit = base::Time::Now(); 433 *first_visit = base::Time::Now();
433 return false; 434 return false;
434 } 435 }
435 *first_visit = base::Time::FromInternalValue(statement.ColumnInt64(0)); 436 *first_visit = base::Time::FromInternalValue(statement.ColumnInt64(0));
436 return true; 437 return true;
437 } 438 }
438 439
439 } // namespace history 440 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_types.cc ('k') | chrome/browser/omnibox_search_hint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698