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

Unified Diff: chromeos/network/network_state.h

Issue 12319145: Using the new Network*Handlers in networkingPrivate Extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Steven's comments. Created 7 years, 10 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: chromeos/network/network_state.h
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 3f64a07ae6b86bbf5388e8ff7f70ef282ecc8e5c..75d8d30a178e8e559ad4e6f5068845fe4cda2019 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -5,8 +5,13 @@
#ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_
#define CHROMEOS_NETWORK_NETWORK_STATE_H_
+#include "base/memory/scoped_ptr.h"
stevenjb 2013/03/05 17:59:18 Not needed
pneubeck (no reviews) 2013/03/07 15:53:02 Done.
#include "chromeos/network/managed_state.h"
+namespace base {
+class DictionaryValue;
+}
+
namespace chromeos {
// Simple class to provide network state information about a network service.
@@ -40,6 +45,10 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
bool IsConnectedState() const;
bool IsConnectingState() const;
+ // Fills |dictionary| with the state properties. This is the inverse function
+ // to PropertyChanged.
gauravsh 2013/03/05 21:04:56 How often do you anticipate this being used? Since
pneubeck (no reviews) 2013/03/07 15:53:02 By having this function in network_state.cc, we re
+ void FillDictionary(base::DictionaryValue* dictionary) const;
gauravsh 2013/03/05 21:04:56 I'd prefer a less generic name - GetPropertyDictio
pneubeck (no reviews) 2013/03/07 15:53:02 Dictionary is already encoded in the type. Chose G
+
// Helpers (used e.g. when a state is cached)
static bool StateIsConnected(const std::string& connection_state);
static bool StateIsConnecting(const std::string& connection_state);

Powered by Google App Engine
This is Rietveld 408576698