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

Unified Diff: ash/common/system/chromeos/network/vpn_list.h

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/chromeos/network/vpn_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/vpn_list.h
diff --git a/ash/common/system/chromeos/network/vpn_list.h b/ash/common/system/chromeos/network/vpn_list.h
deleted file mode 100644
index 6c7b0383d0f516db899ccc428fc2b9f5f12a67a6..0000000000000000000000000000000000000000
--- a/ash/common/system/chromeos/network/vpn_list.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_H_
-#define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_H_
-
-#include <string>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "ash/public/interfaces/vpn_list.mojom.h"
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-
-namespace ash {
-
-// Describes a VPN provider.
-struct ASH_EXPORT VPNProvider {
- // Constructs the built-in VPN provider.
- VPNProvider();
-
- // Constructs a third-party VPN provider.
- VPNProvider(const std::string& extension_id,
- const std::string& third_party_provider_name);
-
- bool operator==(const VPNProvider& other) const;
-
- // Whether this key represents a built-in or third-party VPN provider.
- bool third_party;
-
- // ID of the extension that implements this provider. Used for third-party
- // VPN providers only.
- std::string extension_id;
-
- // Human-readable name if |third_party| is true, otherwise empty.
- std::string third_party_provider_name;
-};
-
-// This delegate provides UI code in ash, e.g. |VPNListView|, with access to the
-// list of VPN providers enabled in the primary user's profile. The delegate
-// furthermore allows the UI code to request that a VPN provider show its "add
-// network" dialog.
-class ASH_EXPORT VpnList : public mojom::VpnList {
- public:
- // An observer that is notified whenever the list of VPN providers enabled in
- // the primary user's profile changes.
- class Observer {
- public:
- virtual void OnVPNProvidersChanged() = 0;
-
- protected:
- virtual ~Observer();
-
- private:
- DISALLOW_ASSIGN(Observer);
- };
-
- VpnList();
- ~VpnList() override;
-
- const std::vector<VPNProvider>& vpn_providers() { return vpn_providers_; }
-
- // Returns |true| if at least one third-party VPN provider is enabled in the
- // primary user's profile, in addition to the built-in OpenVPN/L2TP provider.
- bool HaveThirdPartyVPNProviders() const;
-
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
- // Binds the mojom::VpnList interface to this object.
- void BindRequest(mojom::VpnListRequest request);
-
- // mojom::VpnList:
- void SetThirdPartyVpnProviders(
- std::vector<mojom::ThirdPartyVpnProviderPtr> providers) override;
-
- private:
- // Notify observers that the list of VPN providers enabled in the primary
- // user's profile has changed.
- void NotifyObservers();
-
- // Adds the built-in OpenVPN/L2TP provider to |vpn_providers_|.
- void AddBuiltInProvider();
-
- // Bindings for the mojom::VpnList interface.
- mojo::BindingSet<mojom::VpnList> bindings_;
-
- // Cache of VPN providers, including the built-in OpenVPN/L2TP provider and
- // other providers added by extensions in the primary user's profile.
- std::vector<VPNProvider> vpn_providers_;
-
- base::ObserverList<Observer> observer_list_;
-
- DISALLOW_COPY_AND_ASSIGN(VpnList);
-};
-
-} // namespace ash
-
-#endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_H_
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/chromeos/network/vpn_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698