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

Unified Diff: chrome/browser/chromeos/net/chrome_network_watcher.h

Issue 238433003: Provide Shill IP Address to myIpAddress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 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/net/chrome_network_watcher.h
diff --git a/chrome/browser/chromeos/net/chrome_network_watcher.h b/chrome/browser/chromeos/net/chrome_network_watcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa2f166d310aa1ebb8d02720f8bf9f655fd84624
--- /dev/null
+++ b/chrome/browser/chromeos/net/chrome_network_watcher.h
@@ -0,0 +1,33 @@
+// 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_CHROMEOS_NET_CHROME_NETWORK_WATCHER_H_
+#define CHROME_BROWSER_CHROMEOS_NET_CHROME_NETWORK_WATCHER_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "chromeos/network/network_state_handler_observer.h"
+
+namespace chromeos {
+
+// Chrome specific glue class to observe NetworkStateHandler and handle any
+// necessary updates to net:: on the correct thread.
+class ChromeNetworkWatcher : public NetworkStateHandlerObserver {
+ public:
+ ChromeNetworkWatcher();
+ virtual ~ChromeNetworkWatcher();
+
+ // NetworkStateHandlerObserver
+ virtual void DefaultNetworkChanged(const NetworkState* network) OVERRIDE;
+
+ private:
+ std::string last_ipv4_address_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeNetworkWatcher);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_NET_CHROME_NETWORK_WATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698