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

Side by Side Diff: ash/common/system/chromeos/network/tray_sms.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 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 unified diff | Download patch
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/common/system/chromeos/network/tray_sms.h" 5 #include "ash/common/system/chromeos/network/tray_sms.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/metrics/user_metrics_action.h" 8 #include "ash/common/metrics/user_metrics_action.h"
9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 private: 288 private:
289 TraySms* tray_sms() { return static_cast<TraySms*>(owner()); } 289 TraySms* tray_sms() { return static_cast<TraySms*>(owner()); }
290 290
291 size_t message_index_; 291 size_t message_index_;
292 292
293 DISALLOW_COPY_AND_ASSIGN(SmsNotificationView); 293 DISALLOW_COPY_AND_ASSIGN(SmsNotificationView);
294 }; 294 };
295 295
296 TraySms::TraySms(SystemTray* system_tray) 296 TraySms::TraySms(SystemTray* system_tray)
297 : SystemTrayItem(system_tray), 297 : SystemTrayItem(system_tray, UMA_SMS),
298 default_(nullptr), 298 default_(nullptr),
299 detailed_(nullptr), 299 detailed_(nullptr),
300 notification_(nullptr) { 300 notification_(nullptr) {
301 // TODO(armansito): SMS could be a special case for cellular that requires a 301 // TODO(armansito): SMS could be a special case for cellular that requires a
302 // user (perhaps the owner) to be logged in. If that is the case, then an 302 // user (perhaps the owner) to be logged in. If that is the case, then an
303 // additional check should be done before subscribing for SMS notifications. 303 // additional check should be done before subscribing for SMS notifications.
304 if (chromeos::NetworkHandler::IsInitialized()) 304 if (chromeos::NetworkHandler::IsInitialized())
305 chromeos::NetworkHandler::Get()->network_sms_handler()->AddObserver(this); 305 chromeos::NetworkHandler::Get()->network_sms_handler()->AddObserver(this);
306 } 306 }
307 307
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 std::string number, text; 425 std::string number, text;
426 if (GetLatestMessage(&index, &number, &text)) 426 if (GetLatestMessage(&index, &number, &text))
427 notification_->Update(index, number, text); 427 notification_->Update(index, number, text);
428 } else if (notify) { 428 } else if (notify) {
429 ShowNotificationView(); 429 ShowNotificationView();
430 } 430 }
431 } 431 }
432 } 432 }
433 433
434 } // namespace ash 434 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_network.cc ('k') | ash/common/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698