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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 15233002: Add NetworkStateHandler::RequestUpdateForNetwork (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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/chromeos/cros/network_library.h" 5 #include "chrome/browser/chromeos/cros/network_library.h"
6 6
7 #include "base/i18n/icu_encoding_detection.h" 7 #include "base/i18n/icu_encoding_detection.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/json/json_writer.h" // for debug output only. 10 #include "base/json/json_writer.h" // for debug output only.
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 369 }
370 370
371 void Network::CopyCredentialsFromRemembered(Network* remembered) { 371 void Network::CopyCredentialsFromRemembered(Network* remembered) {
372 } 372 }
373 373
374 void Network::SetValueProperty(const char* prop, const base::Value& value) { 374 void Network::SetValueProperty(const char* prop, const base::Value& value) {
375 DCHECK(prop); 375 DCHECK(prop);
376 if (!EnsureCrosLoaded()) 376 if (!EnsureCrosLoaded())
377 return; 377 return;
378 CrosSetNetworkServiceProperty(service_path_, prop, value); 378 CrosSetNetworkServiceProperty(service_path_, prop, value);
379 // Ensure NetworkStateHandler properties are up-to-date.
380 NetworkStateHandler::Get()->RequestUpdateForNetwork(service_path());
379 } 381 }
380 382
381 void Network::ClearProperty(const char* prop) { 383 void Network::ClearProperty(const char* prop) {
382 DCHECK(prop); 384 DCHECK(prop);
383 if (!EnsureCrosLoaded()) 385 if (!EnsureCrosLoaded())
384 return; 386 return;
385 CrosClearNetworkServiceProperty(service_path_, prop); 387 CrosClearNetworkServiceProperty(service_path_, prop);
388 // Ensure NetworkStateHandler properties are up-to-date.
389 NetworkStateHandler::Get()->RequestUpdateForNetwork(service_path());
386 } 390 }
387 391
388 void Network::SetStringProperty( 392 void Network::SetStringProperty(
389 const char* prop, const std::string& str, std::string* dest) { 393 const char* prop, const std::string& str, std::string* dest) {
390 if (dest) 394 if (dest)
391 *dest = str; 395 *dest = str;
392 SetValueProperty(prop, base::StringValue(str)); 396 SetValueProperty(prop, base::StringValue(str));
393 } 397 }
394 398
395 void Network::SetOrClearStringProperty(const char* prop, 399 void Network::SetOrClearStringProperty(const char* prop,
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 NetworkLibrary* impl; 1378 NetworkLibrary* impl;
1375 if (stub) 1379 if (stub)
1376 impl = new NetworkLibraryImplStub(); 1380 impl = new NetworkLibraryImplStub();
1377 else 1381 else
1378 impl = new NetworkLibraryImplCros(); 1382 impl = new NetworkLibraryImplCros();
1379 impl->Init(); 1383 impl->Init();
1380 return impl; 1384 return impl;
1381 } 1385 }
1382 1386
1383 } // namespace chromeos 1387 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698