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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 275543005: Use GUID instead of ServicePath in networkingPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 bool HasPolicyForFavorite(const FavoriteState* favorite, 297 bool HasPolicyForFavorite(const FavoriteState* favorite,
298 const PrefService* profile_prefs) { 298 const PrefService* profile_prefs) {
299 return onc::HasPolicyForFavoriteNetwork( 299 return onc::HasPolicyForFavoriteNetwork(
300 profile_prefs, g_browser_process->local_state(), *favorite); 300 profile_prefs, g_browser_process->local_state(), *favorite);
301 } 301 }
302 302
303 bool HasPolicyForNetwork(const NetworkState* network, 303 bool HasPolicyForNetwork(const NetworkState* network,
304 const PrefService* profile_prefs) { 304 const PrefService* profile_prefs) {
305 const FavoriteState* favorite = 305 const FavoriteState* favorite =
306 NetworkHandler::Get()->network_state_handler()->GetFavoriteState( 306 NetworkHandler::Get()
307 network->path()); 307 ->network_state_handler()
308 ->GetFavoriteStateFromServicePath(network->path(),
309 true /* configured_only */);
308 if (!favorite) 310 if (!favorite)
309 return false; 311 return false;
310 return HasPolicyForFavorite(favorite, profile_prefs); 312 return HasPolicyForFavorite(favorite, profile_prefs);
311 } 313 }
312 314
313 void SetCommonNetworkInfo(const ManagedState* state, 315 void SetCommonNetworkInfo(const ManagedState* state,
314 const gfx::ImageSkia& icon, 316 const gfx::ImageSkia& icon,
315 ui::ScaleFactor icon_scale_factor, 317 ui::ScaleFactor icon_scale_factor,
316 base::DictionaryValue* network_info) { 318 base::DictionaryValue* network_info) {
317 gfx::ImageSkiaRep image_rep = 319 gfx::ImageSkiaRep image_rep =
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 dictionary->SetBoolean( 1821 dictionary->SetBoolean(
1820 kTagWimaxAvailable, 1822 kTagWimaxAvailable,
1821 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); 1823 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax()));
1822 dictionary->SetBoolean( 1824 dictionary->SetBoolean(
1823 kTagWimaxEnabled, 1825 kTagWimaxEnabled,
1824 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); 1826 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax()));
1825 } 1827 }
1826 1828
1827 } // namespace options 1829 } // namespace options
1828 } // namespace chromeos 1830 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698