| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ |
| 6 #define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ | 6 #define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/history/history_types.h" | 10 #include "chrome/browser/history/history_types.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 bool InitVisitTable(); | 182 bool InitVisitTable(); |
| 183 | 183 |
| 184 // Convenience to fill a VisitRow. Assumes the visit values are bound starting | 184 // Convenience to fill a VisitRow. Assumes the visit values are bound starting |
| 185 // at index 0. | 185 // at index 0. |
| 186 static void FillVisitRow(sql::Statement& statement, VisitRow* visit); | 186 static void FillVisitRow(sql::Statement& statement, VisitRow* visit); |
| 187 | 187 |
| 188 // Convenience to fill a VisitVector. Assumes that statement.step() | 188 // Convenience to fill a VisitVector. Assumes that statement.step() |
| 189 // hasn't happened yet. | 189 // hasn't happened yet. |
| 190 static bool FillVisitVector(sql::Statement& statement, VisitVector* visits); | 190 static bool FillVisitVector(sql::Statement& statement, VisitVector* visits); |
| 191 | 191 |
| 192 // Called by the derived classes to migrate the older visits table which |
| 193 // don't have visit_duration column yet. |
| 194 bool MigrateVisitsWithoutDuration(); |
| 195 |
| 192 private: | 196 private: |
| 193 class VisitAnalysis; | 197 class VisitAnalysis; |
| 194 scoped_ptr<VisitAnalysis> visit_analysis_; | 198 scoped_ptr<VisitAnalysis> visit_analysis_; |
| 195 | 199 |
| 196 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); | 200 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); |
| 197 }; | 201 }; |
| 198 | 202 |
| 199 } // history | 203 } // history |
| 200 | 204 |
| 201 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ | 205 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ |
| OLD | NEW |