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

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

Issue 1912: Renames BoomarkBarModel to BookmarkModel. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 months 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 // Describes a class that can represent the information displayed in a history 5 // Describes a class that can represent the information displayed in a history
6 // view; that is, a list of visited pages. This object knows how to 6 // view; that is, a list of visited pages. This object knows how to
7 // talk to the HistoryService to update its state. 7 // talk to the HistoryService to update its state.
8 8
9 #ifndef CHROME_BROWSER_HISTORY_MODEL_H__ 9 #ifndef CHROME_BROWSER_HISTORY_MODEL_H__
10 #define CHROME_BROWSER_HISTORY_MODEL_H__ 10 #define CHROME_BROWSER_HISTORY_MODEL_H__
jcampan 2008/09/10 23:01:24 Since you were changing the double __ to a single
11 11
12 #include "chrome/browser/base_history_model.h" 12 #include "chrome/browser/base_history_model.h"
13 #include "chrome/common/notification_service.h" 13 #include "chrome/common/notification_service.h"
14 14
15 typedef BaseHistoryModelObserver HistoryModelObserver; 15 typedef BaseHistoryModelObserver HistoryModelObserver;
16 16
17 class HistoryModel : public BaseHistoryModel, 17 class HistoryModel : public BaseHistoryModel,
18 public NotificationObserver { 18 public NotificationObserver {
19 public: 19 public:
20 HistoryModel(Profile* profile, const std::wstring& search_text); 20 HistoryModel(Profile* profile, const std::wstring& search_text);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Sets the starred state of each instance of the given URL in the result set 60 // Sets the starred state of each instance of the given URL in the result set
61 // to the given value. Returns true if anything was updated. 61 // to the given value. Returns true if anything was updated.
62 bool UpdateStarredStateOfURL(const GURL& url, bool is_starred); 62 bool UpdateStarredStateOfURL(const GURL& url, bool is_starred);
63 63
64 // The current search string. 64 // The current search string.
65 std::wstring search_text_; 65 std::wstring search_text_;
66 66
67 // Contents of the current query. 67 // Contents of the current query.
68 history::QueryResults results_; 68 history::QueryResults results_;
69 69
70 // We lazily ask the BookmarkBarModel for whether a URL is starred. This 70 // We lazily ask the BookmarkModel for whether a URL is starred. This enum
71 // enum gives the state of a particular entry. 71 // gives the state of a particular entry.
72 enum StarState { 72 enum StarState {
73 UNKNOWN = 0, // Indicates we haven't determined the state yet. 73 UNKNOWN = 0, // Indicates we haven't determined the state yet.
74 STARRED, 74 STARRED,
75 NOT_STARRED 75 NOT_STARRED
76 }; 76 };
77 77
78 // star_state_ has an entry for each element of results_ indicating whether 78 // star_state_ has an entry for each element of results_ indicating whether
79 // the URL is starred. 79 // the URL is starred.
80 scoped_array<StarState> star_state_; 80 scoped_array<StarState> star_state_;
81 81
82 // How many months back the current query has gone. 82 // How many months back the current query has gone.
83 int search_depth_; 83 int search_depth_;
84 84
85 // The time that the current query was started. 85 // The time that the current query was started.
86 Time search_start_; 86 Time search_start_;
87 87
88 DISALLOW_EVIL_CONSTRUCTORS(HistoryModel); 88 DISALLOW_EVIL_CONSTRUCTORS(HistoryModel);
89 }; 89 };
90 90
91 #endif // CHROME_BROWSER_HISTORY_MODEL_H__ 91 #endif // CHROME_BROWSER_HISTORY_MODEL_H__
92 92
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698