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

Side by Side Diff: ash/common/system/networking_config_delegate.h

Issue 2565823002: Reland: Add test for system tray network menu icon for extension-controlled networks (Closed)
Patch Set: fix use-after-free Created 4 years 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 | ash/common/system/tray/system_tray.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef ASH_COMMON_SYSTEM_NETWORKING_CONFIG_DELEGATE_H_ 5 #ifndef ASH_COMMON_SYSTEM_NETWORKING_CONFIG_DELEGATE_H_
6 #define ASH_COMMON_SYSTEM_NETWORKING_CONFIG_DELEGATE_H_ 6 #define ASH_COMMON_SYSTEM_NETWORKING_CONFIG_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 // This delegate allows the UI code in ash, e.g. |NetworkStateListDetailedView|, 16 // This delegate allows the UI code in ash, e.g. |NetworkStateListDetailedView|,
17 // to access the |NetworkingConfigService| in order to determine whether the 17 // to access the |NetworkingConfigService| in order to determine whether the
18 // configuration of a network identified by its |service_path| is controlled by 18 // configuration of a network identified by its |service_path| is controlled by
19 // an extension. 19 // an extension.
20 // TODO(crbug.com/651157): Eliminate this delegate. Information about extension
21 // controlled networks should be provided by a mojo service that caches data at
22 // the NetworkState level.
20 class NetworkingConfigDelegate { 23 class NetworkingConfigDelegate {
21 public: 24 public:
22 // A struct that provides information about the extension controlling the 25 // A struct that provides information about the extension controlling the
23 // configuration of a network. 26 // configuration of a network.
24 struct ASH_EXPORT ExtensionInfo { 27 struct ASH_EXPORT ExtensionInfo {
25 ExtensionInfo(const std::string& id, const std::string& name); 28 ExtensionInfo(const std::string& id, const std::string& name);
26 ~ExtensionInfo(); 29 ~ExtensionInfo();
27 std::string extension_id; 30 std::string extension_id;
28 std::string extension_name; 31 std::string extension_name;
29 }; 32 };
30 33
31 virtual ~NetworkingConfigDelegate() {} 34 virtual ~NetworkingConfigDelegate() {}
32 35
33 // Returns information about the extension registered to control configuration 36 // Returns information about the extension registered to control configuration
34 // of the network |service_path|. Returns null if no extension is registered. 37 // of the network |service_path|. Returns null if no extension is registered.
35 virtual std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork( 38 virtual std::unique_ptr<const ExtensionInfo> LookUpExtensionForNetwork(
36 const std::string& service_path) = 0; 39 const std::string& service_path) = 0;
37 40
38 private: 41 private:
39 DISALLOW_ASSIGN(NetworkingConfigDelegate); 42 DISALLOW_ASSIGN(NetworkingConfigDelegate);
40 }; 43 };
41 44
42 } // namespace ash 45 } // namespace ash
43 46
44 #endif // ASH_COMMON_SYSTEM_NETWORKING_CONFIG_DELEGATE_H_ 47 #endif // ASH_COMMON_SYSTEM_NETWORKING_CONFIG_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698