Index: chrome/browser/dom_ui/shown_sections_handler.cc |
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc |
index d8f240372be279815a5854967ad080bdf8adad90..a1bcbf6f79f3eab92634eb0a911bb3cbcb048f3f 100644 |
--- a/chrome/browser/dom_ui/shown_sections_handler.cc |
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -91,8 +91,9 @@ void ShownSectionsHandler::HandleGetShownSections(const ListValue* args) { |
} |
void ShownSectionsHandler::HandleSetShownSections(const ListValue* args) { |
- int mode; |
- CHECK(ExtractIntegerValue(args, &mode)); |
+ double mode_double; |
+ CHECK(args->GetReal(0, &mode_double)); |
+ int mode = static_cast<int>(mode_double); |
int old_mode = pref_service_->GetInteger(prefs::kNTPShownSections); |
if (old_mode != mode) { |