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

Side by Side Diff: ash/system/network/tray_sms.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: David's comments Created 8 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/trace_event_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/network/tray_sms.h" 5 #include "ash/system/network/tray_sms.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (preferred_size.height() < kMessageListMinHeight) 202 if (preferred_size.height() < kMessageListMinHeight)
203 preferred_size.set_height(kMessageListMinHeight); 203 preferred_size.set_height(kMessageListMinHeight);
204 return preferred_size; 204 return preferred_size;
205 } 205 }
206 206
207 private: 207 private:
208 void UpdateMessageList() { 208 void UpdateMessageList() {
209 const base::ListValue& messages = tray_->messages(); 209 const base::ListValue& messages = tray_->messages();
210 scroll_content()->RemoveAllChildViews(true); 210 scroll_content()->RemoveAllChildViews(true);
211 for (size_t index = 0; index < messages.GetSize(); ++index) { 211 for (size_t index = 0; index < messages.GetSize(); ++index) {
212 base::DictionaryValue* message = NULL; 212 const base::DictionaryValue* message = NULL;
213 if (!messages.GetDictionary(index, &message)) { 213 if (!messages.GetDictionary(index, &message)) {
214 LOG(ERROR) << "SMS message not a dictionary at: " << index; 214 LOG(ERROR) << "SMS message not a dictionary at: " << index;
215 continue; 215 continue;
216 } 216 }
217 std::string number, text; 217 std::string number, text;
218 if (!GetMessageFromDictionary(message, &number, &text)) { 218 if (!GetMessageFromDictionary(message, &number, &text)) {
219 LOG(ERROR) << "Error parsing SMS message"; 219 LOG(ERROR) << "Error parsing SMS message";
220 continue; 220 continue;
221 } 221 }
222 SmsMessageView* msgview = new SmsMessageView( 222 SmsMessageView* msgview = new SmsMessageView(
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 if (GetLatestMessage(&index, &number, &text)) 369 if (GetLatestMessage(&index, &number, &text))
370 notification_->Update(index, number, text); 370 notification_->Update(index, number, text);
371 } else if (notify) { 371 } else if (notify) {
372 ShowNotificationView(); 372 ShowNotificationView();
373 } 373 }
374 } 374 }
375 } 375 }
376 376
377 } // namespace internal 377 } // namespace internal
378 } // namespace ash 378 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | base/debug/trace_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698