Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/history_model.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/bookmarks/bookmark_model.h" 7 #include "chrome/browser/bookmarks/bookmark_model.h"
8 #include "chrome/browser/profile.h" 8 #include "chrome/browser/profile.h"
9 9
10 using base::Time;
11
10 // The max number of results to retrieve when browsing user's history. 12 // The max number of results to retrieve when browsing user's history.
11 static const int kMaxBrowseResults = 800; 13 static const int kMaxBrowseResults = 800;
12 14
13 // The max number of search results to retrieve. 15 // The max number of search results to retrieve.
14 static const int kMaxSearchResults = 100; 16 static const int kMaxSearchResults = 100;
15 17
16 HistoryModel::HistoryModel(Profile* profile, const std::wstring& search_text) 18 HistoryModel::HistoryModel(Profile* profile, const std::wstring& search_text)
17 : BaseHistoryModel(profile), 19 : BaseHistoryModel(profile),
18 search_text_(search_text), 20 search_text_(search_text),
19 search_depth_(0) { 21 search_depth_(0) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 size_t num_matches; 283 size_t num_matches;
282 const size_t* match_indices = results_.MatchesForURL(url, &num_matches); 284 const size_t* match_indices = results_.MatchesForURL(url, &num_matches);
283 for (size_t i = 0; i < num_matches; i++) { 285 for (size_t i = 0; i < num_matches; i++) {
284 if (IsStarred(static_cast<int>(match_indices[i])) != is_starred) { 286 if (IsStarred(static_cast<int>(match_indices[i])) != is_starred) {
285 star_state_[match_indices[i]] = is_starred ? STARRED : NOT_STARRED; 287 star_state_[match_indices[i]] = is_starred ? STARRED : NOT_STARRED;
286 changed = true; 288 changed = true;
287 } 289 }
288 } 290 }
289 return changed; 291 return changed;
290 } 292 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698