| OLD | NEW |
| 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 #include "chrome/browser/history/text_database_manager.h" | 5 #include "chrome/browser/history/text_database_manager.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "chrome/common/mru_cache.h" | 13 #include "chrome/common/mru_cache.h" |
| 14 | 14 |
| 15 using base::Time; |
| 16 using base::TimeDelta; |
| 17 using base::TimeTicks; |
| 18 |
| 15 namespace history { | 19 namespace history { |
| 16 | 20 |
| 17 namespace { | 21 namespace { |
| 18 | 22 |
| 19 // The number of database files we will be attached to at once. | 23 // The number of database files we will be attached to at once. |
| 20 const int kCacheDBSize = 5; | 24 const int kCacheDBSize = 5; |
| 21 | 25 |
| 22 std::string ConvertStringForIndexer( | 26 std::string ConvertStringForIndexer( |
| 23 const std::wstring& input) { | 27 const std::wstring& input) { |
| 24 // TODO(evanm): other transformations here? | 28 // TODO(evanm): other transformations here? |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 AddPageData(i->first, i->second.url_id(), i->second.visit_id(), | 481 AddPageData(i->first, i->second.url_id(), i->second.visit_id(), |
| 478 i->second.visit_time(), i->second.title(), i->second.body()); | 482 i->second.visit_time(), i->second.title(), i->second.body()); |
| 479 i = recent_changes_.Erase(i); | 483 i = recent_changes_.Erase(i); |
| 480 } | 484 } |
| 481 | 485 |
| 482 ScheduleFlushOldChanges(); | 486 ScheduleFlushOldChanges(); |
| 483 } | 487 } |
| 484 | 488 |
| 485 } // namespace history | 489 } // namespace history |
| 486 | 490 |
| OLD | NEW |