summaryrefslogtreecommitdiffstats
path: root/base/values.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-15 00:17:53 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-15 00:17:53 +0000
commitfb804132c4cd3ad50926a21a148954f67ac656bb (patch)
tree3bb90cf636c87ee51a5b587bdf4492efe1a399c2 /base/values.h
parent841b5d18b22145d0127cf72123b54c91a76fd64f (diff)
downloadchromium_src-fb804132c4cd3ad50926a21a148954f67ac656bb.zip
chromium_src-fb804132c4cd3ad50926a21a148954f67ac656bb.tar.gz
chromium_src-fb804132c4cd3ad50926a21a148954f67ac656bb.tar.bz2
Few changes to the NTP remove thumbnails:
- some minor string changes - there is now a Cancel button next to the Done button to restore the thumbnails removed during the current editing session - link and favico are opacified as well in remove mode - now using a dictionary instead of a list to store the URL blacklist for faster access - now storing URL hashes instead of URLs (for privacy and also because the DictionaryValue breaks down keys on . characters) BUG=None TEST=Make sure removing thumbnails works as expected. Start removing thumbnails then click Cancel, verify that the thumbnails just removed are restored. Review URL: http://codereview.chromium.org/69007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r--base/values.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/values.h b/base/values.h
index cad1311..fa5b1017 100644
--- a/base/values.h
+++ b/base/values.h
@@ -204,6 +204,9 @@ class DictionaryValue : public Value {
// Returns true if the current dictionary has a value for the given key.
bool HasKey(const std::wstring& key) const;
+ // Returns the number of Values in this dictionary.
+ size_t GetSize() const { return dictionary_.size(); }
+
// Clears any current contents of this dictionary.
void Clear();
@@ -214,8 +217,8 @@ class DictionaryValue : public Value {
// If the key at any step of the way doesn't exist, or exists but isn't
// a DictionaryValue, a new DictionaryValue will be created and attached
// to the path in that location.
- // Note that the dictionary takes ownership of the value
- // referenced by in_value.
+ // Note that the dictionary takes ownership of the value referenced by
+ // |in_value|.
bool Set(const std::wstring& path, Value* in_value);
// Convenience forms of Set(). These methods will replace any existing