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

Unified Diff: chrome/browser/chromeos/options/network_connect.h

Issue 21046008: Convert all connect code to use NetworkHandler instead of NetworkLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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
Index: chrome/browser/chromeos/options/network_connect.h
diff --git a/chrome/browser/chromeos/options/network_connect.h b/chrome/browser/chromeos/options/network_connect.h
index 9872cbca8ed819c432e13fa76669e074e8f97f81..2d8acbeed0acf88b8577f853abea526812599ea2 100644
--- a/chrome/browser/chromeos/options/network_connect.h
+++ b/chrome/browser/chromeos/options/network_connect.h
@@ -6,46 +6,47 @@
#define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONNECT_H_
#include <string>
+#include <vector>
+#include "chromeos/network/onc/onc_constants.h"
#include "ui/gfx/native_widget_types.h" // gfx::NativeWindow
+namespace base {
+class DictionaryValue;
+}
+
namespace chromeos {
-namespace network_connect {
-enum ConnectResult {
- NETWORK_NOT_FOUND,
- CONNECT_NOT_STARTED,
- CONNECT_STARTED
-};
+class NetworkState;
-// Activate the cellular network associated with |service_path| if direct
-// activation is supported, otherwise call ShowMobileSetup.
-void ActivateCellular(const std::string& service_path);
+namespace network_connect {
// Shows the mobile setup dialog which handles:
// * Activation for non direct-activation networks
// * Showing network plan info
void ShowMobileSetup(const std::string& service_path);
-// Attempts to connect to the network specified by |service_path|.
-// Returns one of the following results:
-// NETWORK_NOT_FOUND if the network does not exist.
-// CONNECT_NOT_STARTED if no connection attempt was started, e.g. because the
-// network is already connected, connecting, or activating.
-// CONNECT_STARTED if a connection attempt was started.
-ConnectResult ConnectToNetwork(const std::string& service_path,
- gfx::NativeWindow parent_window);
+// Shows the network settings subpage for |service_path| (or the main
+// network settings page if empty).
+void ShowNetworkSettings(const std::string& service_path);
-// Handle an unconfigured network which might do any of the following:
-// * Configure and connect to the network with a matching cert but without
-// pcks11id and tpm pin / slot configured.
-// * Show the enrollment dialog for the network.
-// * Show the configuration dialog for the network.
-// * Show the activation dialog for the network.
-// * Show the settings UI for the network.
+// Handle an unconfigured network:
+// * Show the Configure dialog for wifi/wimax/VPN
+// * Show the Activation, MobileSetup dialog, or settings page for cellular
void HandleUnconfiguredNetwork(const std::string& service_path,
gfx::NativeWindow parent_window);
+// If the network UIData has a matching enrollment URL, triggers the enrollment
+// dialog and returns true.
+bool EnrollNetwork(const std::string& service_path,
+ gfx::NativeWindow parent_window);
+
+// Looks up the policy for |network| for the current active user and sets
+// |onc_source| accordingly.
+const base::DictionaryValue* FindPolicyForActiveUser(
+ const NetworkState* network,
+ onc::ONCSource* onc_source);
+
} // namespace network_connect
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.cc ('k') | chrome/browser/chromeos/options/network_connect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698