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" | |
20 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/common/notification_details.h" | 21 #include "chrome/common/notification_details.h" |
23 #include "chrome/common/notification_source.h" | 22 #include "chrome/common/notification_source.h" |
24 | 23 |
25 namespace history { | 24 namespace history { |
26 | 25 |
27 // If a page becomes starred we use this id in place of the real starred id. | 26 // If a page becomes starred we use this id in place of the real starred id. |
28 // See note in OnURLsStarred. | 27 // See note in OnURLsStarred. |
29 static const StarID kBogusStarredID = 0x0FFFFFFF; | 28 static const StarID kBogusStarredID = 0x0FFFFFFF; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 187 |
189 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) { | 188 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) { |
190 URLID id = db_->GetRowForURL(url, NULL); | 189 URLID id = db_->GetRowForURL(url, NULL); |
191 if (!id) | 190 if (!id) |
192 return false; | 191 return false; |
193 | 192 |
194 return db_->GetKeywordSearchTermRow(id, NULL); | 193 return db_->GetKeywordSearchTermRow(id, NULL); |
195 } | 194 } |
196 | 195 |
197 } // namespace history | 196 } // namespace history |
OLD | NEW |