summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 20:12:50 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 20:12:50 +0000
commitc604a55498cea3b78c4eafda2cb408fd16edf6af (patch)
treeb99109b879257d12a2cbe5c537d0281625946bb2 /base
parent41c78fa1896c5f849c2160ae5de84c232e2c3de9 (diff)
downloadchromium_src-c604a55498cea3b78c4eafda2cb408fd16edf6af.zip
chromium_src-c604a55498cea3b78c4eafda2cb408fd16edf6af.tar.gz
chromium_src-c604a55498cea3b78c4eafda2cb408fd16edf6af.tar.bz2
Allowing MSI mode detection to work from the master preferences file.
Refactor the piece of master preferences code that was in setup_util.h|cc (setup) into master_preferences.h|cc (install_util). This adds an install_util -> googleurl dependency, which should to be fine. Add in master_preferences_dummy.cc to keep the nacl64 stuff compiling happily. Add values.h|cc to the portion of base built in 64 bit mode and add a minor fix to values.cc to make it build. Also refactor accompanying master_preferences test code from setup tests to install_util tests. BUG=19370 Review URL: http://codereview.chromium.org/979003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/base.gypi4
-rw-r--r--base/values.cc7
2 files changed, 8 insertions, 3 deletions
diff --git a/base/base.gypi b/base/base.gypi
index 3325b63..eb99848 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -254,6 +254,8 @@
'utf_string_conversions.cc',
'utf_string_conversions.h',
'unix_domain_socket_posix.cc',
+ 'values.cc',
+ 'values.h',
'waitable_event.h',
'waitable_event_posix.cc',
'waitable_event_watcher.h',
@@ -548,8 +550,6 @@
'sync_socket_posix.cc',
'time_mac.cc',
'time_posix.cc',
- 'values.cc',
- 'values.h',
'version.cc',
'version.h',
],
diff --git a/base/values.cc b/base/values.cc
index f78f474..f214ead 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -816,7 +816,12 @@ int ListValue::Remove(const Value& value) {
size_t index = i - list_.begin();
delete *i;
list_.erase(i);
- return index;
+
+ // TODO(anyone): Returning a signed int type here is just wrong.
+ // Change this interface to return a size_t.
+ DCHECK(index <= INT_MAX);
+ int return_index = static_cast<int>(index);
+ return return_index;
}
}
return -1;