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

Unified Diff: chrome/browser/chromeos/tether/fake_tether_service.h

Issue 2900903002: Create a FakeTetherService, which stubs out TetherService for development. (Closed)
Patch Set: Rebase. Created 3 years, 7 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/tether/fake_tether_service.h
diff --git a/chrome/browser/chromeos/tether/fake_tether_service.h b/chrome/browser/chromeos/tether/fake_tether_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..649f6597ab94d7d3b73636192f3f4668f2e06287
--- /dev/null
+++ b/chrome/browser/chromeos/tether/fake_tether_service.h
@@ -0,0 +1,36 @@
+// Copyright 2017 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_CHROMEOS_TETHER_FAKE_TETHER_SERVICE_H_
+#define CHROME_BROWSER_CHROMEOS_TETHER_FAKE_TETHER_SERVICE_H_
+
+#include "chrome/browser/chromeos/tether/tether_service.h"
+
+// A stub of TetherService that provides an easy way to develop for Tether on
+// non-Chromebooks or without a Tether host. To use, see
+// chromeos::switches::kTetherStub for more details.
+class FakeTetherService : public TetherService {
+ public:
+ FakeTetherService(int num_tether_networks,
stevenjb 2017/05/23 22:24:33 I'd rather just have this default to '1' and call
Ryan Hansberry 2017/05/23 22:53:12 Done.
+ Profile* profile,
+ chromeos::PowerManagerClient* power_manager_client,
+ chromeos::SessionManagerClient* session_manager_client,
+ cryptauth::CryptAuthService* cryptauth_service,
+ chromeos::NetworkStateHandler* network_state_handler);
+
+ // TetherService:
+ void StartTetherIfEnabled() override;
+ void StopTether() override;
+
+ protected:
+ // TetherService:
+ bool HasSyncedTetherHosts() const override;
+
+ private:
+ int num_tether_networks_;
stevenjb 2017/05/23 22:24:33 = 1;
Ryan Hansberry 2017/05/23 22:53:12 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(FakeTetherService);
+};
+
+#endif // CHROME_BROWSER_CHROMEOS_TETHER_FAKE_TETHER_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698