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

Side by Side Diff: ash/system/chromeos/network/tray_vpn.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « ash/system/chromeos/network/tray_sms.cc ('k') | ash/system/chromeos/network/vpn_delegate.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/chromeos/network/tray_vpn.h" 5 #include "ash/system/chromeos/network/tray_vpn.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/system/tray/system_tray_delegate.h" 8 #include "ash/common/system/tray/system_tray_delegate.h"
9 #include "ash/common/system/tray/tray_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_item_more.h" 10 #include "ash/common/system/tray/tray_item_more.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 DISALLOW_COPY_AND_ASSIGN(VpnDefaultView); 109 DISALLOW_COPY_AND_ASSIGN(VpnDefaultView);
110 }; 110 };
111 111
112 } // namespace tray 112 } // namespace tray
113 113
114 TrayVPN::TrayVPN(SystemTray* system_tray) 114 TrayVPN::TrayVPN(SystemTray* system_tray)
115 : SystemTrayItem(system_tray), default_(NULL), detailed_(NULL) { 115 : SystemTrayItem(system_tray), default_(NULL), detailed_(NULL) {
116 network_state_observer_.reset(new TrayNetworkStateObserver(this)); 116 network_state_observer_.reset(new TrayNetworkStateObserver(this));
117 } 117 }
118 118
119 TrayVPN::~TrayVPN() { 119 TrayVPN::~TrayVPN() {}
120 }
121 120
122 views::View* TrayVPN::CreateTrayView(LoginStatus status) { 121 views::View* TrayVPN::CreateTrayView(LoginStatus status) {
123 return NULL; 122 return NULL;
124 } 123 }
125 124
126 views::View* TrayVPN::CreateDefaultView(LoginStatus status) { 125 views::View* TrayVPN::CreateDefaultView(LoginStatus status) {
127 CHECK(default_ == NULL); 126 CHECK(default_ == NULL);
128 if (!chromeos::NetworkHandler::IsInitialized()) 127 if (!chromeos::NetworkHandler::IsInitialized())
129 return NULL; 128 return NULL;
130 if (status == LoginStatus::NOT_LOGGED_IN) 129 if (status == LoginStatus::NOT_LOGGED_IN)
(...skipping 15 matching lines...) Expand all
146 if (!chromeos::NetworkHandler::IsInitialized()) 145 if (!chromeos::NetworkHandler::IsInitialized())
147 return NULL; 146 return NULL;
148 147
149 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_DETAILED_VPN_VIEW); 148 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_DETAILED_VPN_VIEW);
150 detailed_ = new tray::NetworkStateListDetailedView( 149 detailed_ = new tray::NetworkStateListDetailedView(
151 this, tray::NetworkStateListDetailedView::LIST_TYPE_VPN, status); 150 this, tray::NetworkStateListDetailedView::LIST_TYPE_VPN, status);
152 detailed_->Init(); 151 detailed_->Init();
153 return detailed_; 152 return detailed_;
154 } 153 }
155 154
156 void TrayVPN::DestroyTrayView() { 155 void TrayVPN::DestroyTrayView() {}
157 }
158 156
159 void TrayVPN::DestroyDefaultView() { 157 void TrayVPN::DestroyDefaultView() {
160 default_ = NULL; 158 default_ = NULL;
161 } 159 }
162 160
163 void TrayVPN::DestroyDetailedView() { 161 void TrayVPN::DestroyDetailedView() {
164 detailed_ = NULL; 162 detailed_ = NULL;
165 } 163 }
166 164
167 void TrayVPN::UpdateAfterLoginStatusChange(LoginStatus status) {} 165 void TrayVPN::UpdateAfterLoginStatusChange(LoginStatus status) {}
168 166
169 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} 167 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {}
170 168
171 void TrayVPN::NetworkStateChanged() { 169 void TrayVPN::NetworkStateChanged() {
172 if (default_) 170 if (default_)
173 default_->Update(); 171 default_->Update();
174 if (detailed_) 172 if (detailed_)
175 detailed_->Update(); 173 detailed_->Update();
176 } 174 }
177 175
178 } // namespace ash 176 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/tray_sms.cc ('k') | ash/system/chromeos/network/vpn_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698