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

Side by Side Diff: ash/mus/system_tray_delegate_mus.cc

Issue 2836453003: tray: Show warning in network tray when VPN or proxy used. (Closed)
Patch Set: Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/system_tray_delegate_mus.h" 5 #include "ash/mus/system_tray_delegate_mus.h"
6 6
7 #include "ash/session/session_controller.h" 7 #include "ash/session/session_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/networking_config_delegate.h" 9 #include "ash/system/networking_config_delegate.h"
10 10
11 namespace ash { 11 namespace ash {
12 namespace { 12 namespace {
13 13
14 // TODO(mash): Provide a real implementation, perhaps by folding its behavior 14 // TODO(mash): Provide a real implementation, perhaps by folding its behavior
15 // into an ash-side network information cache. http://crbug.com/651157 15 // into an ash-side network information cache. http://crbug.com/651157
16 class StubNetworkingConfigDelegate : public NetworkingConfigDelegate { 16 class StubNetworkingConfigDelegate : public NetworkingConfigDelegate {
17 public: 17 public:
18 StubNetworkingConfigDelegate() {} 18 StubNetworkingConfigDelegate() {}
19 ~StubNetworkingConfigDelegate() override {} 19 ~StubNetworkingConfigDelegate() override {}
20 20
21 private: 21 private:
22 // NetworkingConfigDelegate: 22 // NetworkingConfigDelegate:
23 std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork( 23 std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork(
24 const std::string& guid) override { 24 const std::string& guid) override {
25 return nullptr; 25 return nullptr;
26 } 26 }
27 27
28 bool HasDefaultNetworkProxyConfigured() override { return false; }
29
28 DISALLOW_COPY_AND_ASSIGN(StubNetworkingConfigDelegate); 30 DISALLOW_COPY_AND_ASSIGN(StubNetworkingConfigDelegate);
29 }; 31 };
30 32
31 } // namespace 33 } // namespace
32 34
33 SystemTrayDelegateMus::SystemTrayDelegateMus() 35 SystemTrayDelegateMus::SystemTrayDelegateMus()
34 : networking_config_delegate_(new StubNetworkingConfigDelegate) {} 36 : networking_config_delegate_(new StubNetworkingConfigDelegate) {}
35 37
36 SystemTrayDelegateMus::~SystemTrayDelegateMus() { 38 SystemTrayDelegateMus::~SystemTrayDelegateMus() {
37 } 39 }
38 40
39 LoginStatus SystemTrayDelegateMus::GetUserLoginStatus() const { 41 LoginStatus SystemTrayDelegateMus::GetUserLoginStatus() const {
40 return Shell::Get()->session_controller()->login_status(); 42 return Shell::Get()->session_controller()->login_status();
41 } 43 }
42 44
43 NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate() 45 NetworkingConfigDelegate* SystemTrayDelegateMus::GetNetworkingConfigDelegate()
44 const { 46 const {
45 return networking_config_delegate_.get(); 47 return networking_config_delegate_.get();
46 } 48 }
47 49
48 } // namespace ash 50 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698