| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/in_memory_history_backend.h" | 5 #include "chrome/browser/history/in_memory_history_backend.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/history/history_notifications.h" | 12 #include "chrome/browser/history/history_notifications.h" |
| 13 #include "chrome/browser/history/in_memory_database.h" | 13 #include "chrome/browser/history/in_memory_database.h" |
| 14 #include "chrome/browser/history/in_memory_url_index.h" | 14 #include "chrome/browser/history/in_memory_url_index.h" |
| 15 #include "chrome/browser/history/url_database.h" | 15 #include "chrome/browser/history/url_database.h" |
| 16 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" |
| 17 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 19 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 | 21 |
| 22 namespace history { | 22 namespace history { |
| 23 | 23 |
| 24 // If a page becomes starred we use this id in place of the real starred id. | 24 // If a page becomes starred we use this id in place of the real starred id. |
| 25 // See note in OnURLsStarred. | 25 // See note in OnURLsStarred. |
| 26 static const StarID kBogusStarredID = 0x0FFFFFFF; | 26 static const StarID kBogusStarredID = 0x0FFFFFFF; |
| 27 | 27 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 if (!url_id) | 176 if (!url_id) |
| 177 return; // Error adding. | 177 return; // Error adding. |
| 178 } else { | 178 } else { |
| 179 url_id = url_row.id(); | 179 url_id = url_row.id(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 db_->SetKeywordSearchTermsForURL(url_id, details.keyword_id, details.term); | 182 db_->SetKeywordSearchTermsForURL(url_id, details.keyword_id, details.term); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace history | 185 } // namespace history |
| OLD | NEW |