diff options
-rw-r--r-- | chrome/browser/automation/automation_provider_observers.cc | 4 | ||||
-rw-r--r-- | chrome/test/pyautolib/history_info.py | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index a62c11b..1c26ae7 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -16,6 +16,7 @@ #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/login_prompt.h" #include "chrome/browser/metrics/metric_event_duration_details.h" +#include "chrome/browser/profile.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/extensions/extension.h" @@ -960,6 +961,9 @@ void AutomationProviderHistoryObserver::HistoryQueryComplete( page_value->SetInteger(L"time", static_cast<int>(page.visit_time().ToTimeT())); page_value->SetString(L"snippet", page.snippet().text()); + page_value->SetBoolean( + L"starred", + provider_->profile()->GetBookmarkModel()->IsBookmarked(page.url())); history_list->Append(page_value); } diff --git a/chrome/test/pyautolib/history_info.py b/chrome/test/pyautolib/history_info.py index ec7a732..7407f05 100644 --- a/chrome/test/pyautolib/history_info.py +++ b/chrome/test/pyautolib/history_info.py @@ -61,13 +61,15 @@ class HistoryInfo(object): Example: [ { u'snippet': u'', - u'time': 1271465667, + u'starred': False, + u'time': 1271781612, u'title': u'Google News', u'url': u'http://news.google.com/'}, { u'snippet': u'', - u'time': 1271465667, + u'starred': True, + u'time': 1271781602, u'title': u'Google', - u'url': u'http://www.google.com/'}]} + u'url': u'http://www.google.com/'}] The snippet attribute will be empty in most cases. If GetHistoryInfo() is provided a non-empty search_text arg, the snippet attribute will contain the |