Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: chrome/browser/ui/webui/options2/handler_options_handler.cc

Issue 10837044: Correct const accessors in base/values.(h|cc), Part II (ListValue) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options2/handler_options_handler.cc
diff --git a/chrome/browser/ui/webui/options2/handler_options_handler.cc b/chrome/browser/ui/webui/options2/handler_options_handler.cc
index b2177de8f980580c514beaafcc83f44165fb8c80..c243706565e8a923ad88d3c109985644ed12701e 100644
--- a/chrome/browser/ui/webui/options2/handler_options_handler.cc
+++ b/chrome/browser/ui/webui/options2/handler_options_handler.cc
@@ -131,7 +131,7 @@ void HandlerOptionsHandler::UpdateHandlerList() {
}
void HandlerOptionsHandler::RemoveHandler(const ListValue* args) {
- ListValue* list;
+ const ListValue* list;
if (!args->GetList(0, &list)) {
NOTREACHED();
return;
@@ -146,7 +146,7 @@ void HandlerOptionsHandler::RemoveHandler(const ListValue* args) {
}
void HandlerOptionsHandler::RemoveIgnoredHandler(const ListValue* args) {
- ListValue* list;
+ const ListValue* list;
if (!args->GetList(0, &list)) {
NOTREACHED();
return;
@@ -166,7 +166,7 @@ void HandlerOptionsHandler::SetHandlersEnabled(const ListValue* args) {
}
void HandlerOptionsHandler::ClearDefault(const ListValue* args) {
- Value* value;
+ const Value* value;
CHECK(args->Get(0, &value));
std::string protocol_to_clear;
CHECK(value->GetAsString(&protocol_to_clear));
@@ -174,9 +174,7 @@ void HandlerOptionsHandler::ClearDefault(const ListValue* args) {
}
void HandlerOptionsHandler::SetDefault(const ListValue* args) {
- Value* value;
- CHECK(args->Get(0, &value));
- ListValue* list;
+ const ListValue* list;
CHECK(args->GetList(0, &list));
const ProtocolHandler& handler(ParseHandlerFromArgs(list));
CHECK(!handler.IsEmpty());

Powered by Google App Engine
This is Rietveld 408576698