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

Unified Diff: chrome/browser/local_discovery/privetv3_setup_flow.h

Issue 873103002: Removed unused native code related to wifi bootstrapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sun 01/25/2015 21:44:58.31 Created 5 years, 11 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/local_discovery/privetv3_setup_flow.h
diff --git a/chrome/browser/local_discovery/privetv3_setup_flow.h b/chrome/browser/local_discovery/privetv3_setup_flow.h
deleted file mode 100644
index 401693d0ac618979eec746ad1a45142150e0ce42..0000000000000000000000000000000000000000
--- a/chrome/browser/local_discovery/privetv3_setup_flow.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2014 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 CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SETUP_FLOW_H_
-#define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SETUP_FLOW_H_
-
-#include <string>
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/local_discovery/gcd_api_flow.h"
-#include "chrome/browser/local_discovery/privet_http.h"
-#include "chrome/browser/local_discovery/privetv3_session.h"
-
-namespace local_discovery {
-
-// Provides complete flow for Privet v3 device setup.
-class PrivetV3SetupFlow {
- public:
- // Delegate to be implemented by client code.
- class Delegate {
- public:
- typedef base::Callback<void(bool success)> ResultCallback;
- // If |ssid| is empty, call failed to get credentials.
- // If |key| is empty, network is open.
- typedef base::Callback<void(const std::string& ssid,
- const std::string& key)> CredentialsCallback;
-
- typedef base::Callback<void(scoped_ptr<PrivetHTTPClient>)>
- PrivetClientCallback;
-
- virtual ~Delegate();
-
- // Creates |GCDApiFlowImpl| for making requests to GCD server.
- virtual scoped_ptr<GCDApiFlow> CreateApiFlow() = 0;
-
- // Requests WiFi credentials.
- virtual void GetWiFiCredentials(const CredentialsCallback& callback) = 0;
-
- // Switches to setup WiFi network.
- // If switch was successfully |RestoreWifi| should be called later.
- virtual void SwitchToSetupWiFi(const ResultCallback& callback) = 0;
-
- // Starts device resolution that should callback with ready
- // |PrivetV3HTTPClient|.
- virtual void CreatePrivetV3Client(const std::string& service_name,
- const PrivetClientCallback& callback) = 0;
-
- // Requests client to prompt user to check pairing code.
- virtual void ConfirmSecurityCode(const ResultCallback& callback) = 0;
-
- // Restores WiFi network.
- virtual void RestoreWifi(const ResultCallback& callback) = 0;
-
- // Notifies client that device is set up.
- virtual void OnSetupDone() = 0;
-
- // Notifies client setup failed.
- virtual void OnSetupError() = 0;
- };
-
- explicit PrivetV3SetupFlow(Delegate* delegate);
- virtual ~PrivetV3SetupFlow();
-
- // Starts registration.
- void Register(const std::string& service_name);
-
-#if defined(ENABLE_WIFI_BOOTSTRAPPING)
- void SetupWifiAndRegister(const std::string& device_ssid);
-#endif // ENABLE_WIFI_BOOTSTRAPPING
-
- void OnSetupError();
-
- const std::string& service_name() const { return service_name_; }
-
- private:
- void OnTicketCreated(const std::string& ticket_id,
- const std::string& device_id);
- void OnPrivetClientCreated(scoped_ptr<PrivetHTTPClient> privet_http_client);
- void OnCodeConfirmed(bool success);
-
- void OnSessionInitialized(
- PrivetV3Session::Result result,
- const std::vector<PrivetV3Session::PairingType>& types);
- void OnPairingStarted(PrivetV3Session::Result result);
- void OnPairingDone(PrivetV3Session::Result result);
- void OnSetupMessageSent(PrivetV3Session::Result result,
- const base::DictionaryValue& response);
-
- Delegate* delegate_;
- std::string service_name_;
- std::string device_id_;
- std::string ticket_id_;
- scoped_ptr<GCDApiFlow> ticket_request_;
- scoped_ptr<PrivetV3Session> session_;
- base::WeakPtrFactory<PrivetV3SetupFlow> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PrivetV3SetupFlow);
-};
-
-} // namespace local_discovery
-
-#endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SETUP_FLOW_H_
« no previous file with comments | « chrome/browser/local_discovery/privetv3_crypto_provider.cc ('k') | chrome/browser/local_discovery/privetv3_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698