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_model.h" | 5 #include "chrome/browser/history_model.h" |
6 | 6 |
7 #include "chrome/browser/bookmark_bar_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_bar_model.h" |
8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
9 | 9 |
10 // The max number of results to retrieve when browsing user's history. | 10 // The max number of results to retrieve when browsing user's history. |
11 static const int kMaxBrowseResults = 800; | 11 static const int kMaxBrowseResults = 800; |
12 | 12 |
13 // The max number of search results to retrieve. | 13 // The max number of search results to retrieve. |
14 static const int kMaxSearchResults = 100; | 14 static const int kMaxSearchResults = 100; |
15 | 15 |
16 HistoryModel::HistoryModel(Profile* profile, const std::wstring& search_text) | 16 HistoryModel::HistoryModel(Profile* profile, const std::wstring& search_text) |
17 : BaseHistoryModel(profile), | 17 : BaseHistoryModel(profile), |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 size_t num_matches; | 280 size_t num_matches; |
281 const size_t* match_indices = results_.MatchesForURL(url, &num_matches); | 281 const size_t* match_indices = results_.MatchesForURL(url, &num_matches); |
282 for (size_t i = 0; i < num_matches; i++) { | 282 for (size_t i = 0; i < num_matches; i++) { |
283 if (IsStarred(static_cast<int>(match_indices[i])) != is_starred) { | 283 if (IsStarred(static_cast<int>(match_indices[i])) != is_starred) { |
284 star_state_[match_indices[i]] = is_starred ? STARRED : NOT_STARRED; | 284 star_state_[match_indices[i]] = is_starred ? STARRED : NOT_STARRED; |
285 changed = true; | 285 changed = true; |
286 } | 286 } |
287 } | 287 } |
288 return changed; | 288 return changed; |
289 } | 289 } |
OLD | NEW |