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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chromeos/network/network_profile.h"
6
7 #include "base/stringprintf.h"
8
9 namespace chromeos {
10
11 std::string ProfileToString(const NetworkProfile* profile) {
12 if (!profile)
13 return "NetworkProfile(NULL)";
14
15 std::string result;
16 switch (profile->type()) {
17 case NetworkProfile::TYPE_SHARED:
18 return base::StringPrintf("NetworkProfile(SHARED, %s)",
19 profile->path.c_str());
20 case NetworkProfile::TYPE_USER:
21 return base::StringPrintf("NetworkProfile(USER, %s, %s)",
22 profile->path.c_str(),
23 profile->userhash.c_str());
24 }
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.
25 return std::string();
26 }
27
28 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698