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

Unified Diff: chrome/browser/chromeos/cros/native_network_parser.h

Issue 7714004: base: Add AsList() function to Value API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 9 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/cros/native_network_parser.h
diff --git a/chrome/browser/chromeos/cros/native_network_parser.h b/chrome/browser/chromeos/cros/native_network_parser.h
index eee13843a2be7722d7053112d65fb1dc2fd48cd3..29af4feaa781f11de5a233d42d5c5baa032a658d 100644
--- a/chrome/browser/chromeos/cros/native_network_parser.h
+++ b/chrome/browser/chromeos/cros/native_network_parser.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_CHROMEOS_CROS_NATIVE_NETWORK_PARSER_H_
#pragma once
-#include "chrome/browser/chromeos/cros/network_parser.h"
#include "base/compiler_specific.h" // for OVERRIDE
+#include "chrome/browser/chromeos/cros/network_parser.h"
namespace chromeos {
@@ -18,9 +18,11 @@ class NativeNetworkDeviceParser : public NetworkDeviceParser {
public:
NativeNetworkDeviceParser();
virtual ~NativeNetworkDeviceParser();
+
virtual bool ParseValue(PropertyIndex index,
- const Value& value,
+ Value* value,
NetworkDevice* device) OVERRIDE;
+
protected:
virtual ConnectionType ParseType(const std::string& type) OVERRIDE;
@@ -46,11 +48,13 @@ class NativeNetworkParser : public NetworkParser {
public:
NativeNetworkParser();
virtual ~NativeNetworkParser();
+
static const EnumMapper<PropertyIndex>* property_mapper();
static const ConnectionType ParseConnectionType(const std::string& type);
+
protected:
virtual bool ParseValue(PropertyIndex index,
- const Value& value,
+ Value* value,
Network* network) OVERRIDE;
virtual ConnectionType ParseType(const std::string& type) OVERRIDE;
virtual ConnectionType ParseTypeFromDictionary(
@@ -58,6 +62,7 @@ class NativeNetworkParser : public NetworkParser {
virtual ConnectionMode ParseMode(const std::string& mode) OVERRIDE;
virtual ConnectionState ParseState(const std::string& state) OVERRIDE;
virtual ConnectionError ParseError(const std::string& error) OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(NativeNetworkParser);
};
@@ -67,6 +72,7 @@ class NativeEthernetNetworkParser : public NativeNetworkParser {
public:
NativeEthernetNetworkParser();
virtual ~NativeEthernetNetworkParser();
+
private:
// NOTE: Uses base class ParseValue, etc.
@@ -79,8 +85,9 @@ class NativeWirelessNetworkParser : public NativeNetworkParser {
NativeWirelessNetworkParser();
virtual ~NativeWirelessNetworkParser();
virtual bool ParseValue(PropertyIndex index,
- const Value& value,
+ Value* value,
Network* network) OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(NativeWirelessNetworkParser);
};
@@ -90,12 +97,14 @@ class NativeWifiNetworkParser : public NativeWirelessNetworkParser {
NativeWifiNetworkParser();
virtual ~NativeWifiNetworkParser();
virtual bool ParseValue(PropertyIndex index,
- const Value& value,
+ Value* value,
Network* network) OVERRIDE;
+
protected:
ConnectionSecurity ParseSecurity(const std::string& security);
EAPMethod ParseEAPMethod(const std::string& method);
EAPPhase2Auth ParseEAPPhase2Auth(const std::string& auth);
+
private:
DISALLOW_COPY_AND_ASSIGN(NativeWifiNetworkParser);
};
@@ -105,14 +114,14 @@ class NativeCellularNetworkParser : public NativeWirelessNetworkParser {
NativeCellularNetworkParser();
virtual ~NativeCellularNetworkParser();
virtual bool ParseValue(PropertyIndex index,
- const Value& value,
+ Value* value,
Network* network) OVERRIDE;
+
protected:
ActivationState ParseActivationState(const std::string& state);
- NetworkTechnology ParseNetworkTechnology(
- const std::string& technology);
- NetworkRoamingState ParseRoamingState(
- const std::string& roaming_state);
+ NetworkTechnology ParseNetworkTechnology(const std::string& technology);
+ NetworkRoamingState ParseRoamingState(const std::string& roaming_state);
+
private:
DISALLOW_COPY_AND_ASSIGN(NativeCellularNetworkParser);
};
@@ -122,20 +131,21 @@ class NativeVirtualNetworkParser : public NativeNetworkParser {
NativeVirtualNetworkParser();
virtual ~NativeVirtualNetworkParser();
virtual bool ParseValue(PropertyIndex index,
- const Value& value,
+ Value* value,
Network* network) OVERRIDE;
virtual bool UpdateNetworkFromInfo(const DictionaryValue& info,
Network* network) OVERRIDE;
+
protected:
bool ParseProviderValue(PropertyIndex index,
- const Value& value,
- VirtualNetwork* network);
+ const Value& value,
+ VirtualNetwork* network);
ProviderType ParseProviderType(const std::string& type);
+
private:
DISALLOW_COPY_AND_ASSIGN(NativeVirtualNetworkParser);
};
-
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_CROS_NATIVE_NETWORK_PARSER_H_
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/chromeos/cros/native_network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698