summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 22:00:43 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 22:00:43 +0000
commit58555ce035571ee7d8620dd3e57cc7bf1adfd9b2 (patch)
treeb59d9079f68dcce43947c6c13fb316c43b7adb57
parentc98ae312b89e8ba2a0c998c85157dc478d32686d (diff)
downloadchromium_src-58555ce035571ee7d8620dd3e57cc7bf1adfd9b2.zip
chromium_src-58555ce035571ee7d8620dd3e57cc7bf1adfd9b2.tar.gz
chromium_src-58555ce035571ee7d8620dd3e57cc7bf1adfd9b2.tar.bz2
Add info about starred history items.
This is the last bit of info we needed from the chrome://history/ page ( the one I forgot to add in the last CL). With this, we can write tests combining history and bookmarks! Review URL: http://codereview.chromium.org/1618032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45086 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc4
-rw-r--r--chrome/test/pyautolib/history_info.py8
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