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

Unified Diff: chromeos/network/network_profile.cc

Issue 13957012: Adding a NetworkProfileHandler used by ManagedNetworkConfigurationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. Created 7 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: chromeos/network/network_profile.cc
diff --git a/chromeos/network/network_profile.cc b/chromeos/network/network_profile.cc
new file mode 100644
index 0000000000000000000000000000000000000000..66d801c571bf307a22e5446fe47249a5aaee6925
--- /dev/null
+++ b/chromeos/network/network_profile.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2013 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.
+
+#include "chromeos/network/network_profile.h"
+
+#include "base/stringprintf.h"
+
+namespace chromeos {
+
+std::string ProfileToString(const NetworkProfile* profile) {
+ if (!profile)
+ return "NetworkProfile(NULL)";
+
+ std::string result;
+ switch (profile->type()) {
+ case NetworkProfile::TYPE_SHARED:
+ return base::StringPrintf("NetworkProfile(SHARED, %s)",
+ profile->path.c_str());
+ case NetworkProfile::TYPE_USER:
+ return base::StringPrintf("NetworkProfile(USER, %s, %s)",
+ profile->path.c_str(),
+ profile->userhash.c_str());
+ }
stevenjb 2013/04/26 21:00:49 nit: Also better as if/else Also, if only for logg
pneubeck (no reviews) 2013/04/29 18:05:51 Done.
+ return std::string();
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698