| 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 <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/history/history_notifications.h" | 15 #include "chrome/browser/history/history_notifications.h" |
| 16 #include "chrome/browser/history/in_memory_database.h" | 16 #include "chrome/browser/history/in_memory_database.h" |
| 17 #include "chrome/browser/history/in_memory_url_index.h" | 17 #include "chrome/browser/history/in_memory_url_index.h" |
| 18 #include "chrome/browser/history/url_database.h" | 18 #include "chrome/browser/history/url_database.h" |
| 19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/notification_details.h" | 22 #include "chrome/common/notification_details.h" |
| 23 #include "chrome/common/notification_source.h" | 23 #include "chrome/common/notification_source.h" |
| 24 #include "chrome/common/pref_names.h" | |
| 25 | 24 |
| 26 namespace history { | 25 namespace history { |
| 27 | 26 |
| 28 // If a page becomes starred we use this id in place of the real starred id. | 27 // If a page becomes starred we use this id in place of the real starred id. |
| 29 // See note in OnURLsStarred. | 28 // See note in OnURLsStarred. |
| 30 static const StarID kBogusStarredID = 0x0FFFFFFF; | 29 static const StarID kBogusStarredID = 0x0FFFFFFF; |
| 31 | 30 |
| 32 InMemoryHistoryBackend::InMemoryHistoryBackend() | 31 InMemoryHistoryBackend::InMemoryHistoryBackend() |
| 33 : profile_(NULL) { | 32 : profile_(NULL) { |
| 34 } | 33 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 188 |
| 190 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) { | 189 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) { |
| 191 URLID id = db_->GetRowForURL(url, NULL); | 190 URLID id = db_->GetRowForURL(url, NULL); |
| 192 if (!id) | 191 if (!id) |
| 193 return false; | 192 return false; |
| 194 | 193 |
| 195 return db_->GetKeywordSearchTermRow(id, NULL); | 194 return db_->GetKeywordSearchTermRow(id, NULL); |
| 196 } | 195 } |
| 197 | 196 |
| 198 } // namespace history | 197 } // namespace history |
| OLD | NEW |