summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authorpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-18 14:43:27 +0000
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-18 14:43:27 +0000
commita899c0b0e1020347c5fc4bfc9c6d83cf13e8bd4a (patch)
treeadf4d31e271ad9f54b6faf11be37acab769101c2 /remoting/host
parentc622538f6219a0d9d10878a25e447081b3b3c72c (diff)
downloadchromium_src-a899c0b0e1020347c5fc4bfc9c6d83cf13e8bd4a.zip
chromium_src-a899c0b0e1020347c5fc4bfc9c6d83cf13e8bd4a.tar.gz
chromium_src-a899c0b0e1020347c5fc4bfc9c6d83cf13e8bd4a.tar.bz2
Replaced DictionaryValue::key_iterator by DictionaryValue::Iterator outside of chrome/browser.
Marked Iterator::HasNext() as deprecated and added a method Iterator::CanAdvance() as replacement. As DictionaryValue::Iterator is actually a const iterator, I had to add several missing const annotations, mostly, in json_schema_validator.* and command.* BUG=162611 TEST=No new tests. Only semantically equivalent refactorings. Review URL: https://chromiumcodereview.appspot.com/11418150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177673 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/in_memory_host_config.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/remoting/host/in_memory_host_config.cc b/remoting/host/in_memory_host_config.cc
index b2f2991..486b201 100644
--- a/remoting/host/in_memory_host_config.cc
+++ b/remoting/host/in_memory_host_config.cc
@@ -10,7 +10,7 @@
namespace remoting {
InMemoryHostConfig::InMemoryHostConfig()
- : values_(new DictionaryValue()) {
+ : values_(new base::DictionaryValue()) {
}
InMemoryHostConfig::~InMemoryHostConfig() {}
@@ -47,14 +47,14 @@ void InMemoryHostConfig::SetBoolean(const std::string& path, bool in_value) {
bool InMemoryHostConfig::CopyFrom(const base::DictionaryValue* dictionary) {
bool result = true;
- for (DictionaryValue::key_iterator key(dictionary->begin_keys());
- key != dictionary->end_keys(); ++key) {
+ for (base::DictionaryValue::Iterator it(*dictionary); !it.IsAtEnd();
+ it.Advance()) {
std::string str_value;
bool bool_value;
- if (dictionary->GetString(*key, &str_value)) {
- SetString(*key, str_value);
- } else if (dictionary->GetBoolean(*key, &bool_value)) {
- SetBoolean(*key, bool_value);
+ if (it.value().GetAsString(&str_value)) {
+ SetString(it.key(), str_value);
+ } else if (it.value().GetAsBoolean(&bool_value)) {
+ SetBoolean(it.key(), bool_value);
} else {
result = false;
}