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

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

Issue 11369258: Revert 167808 - Get rid of use of CreateStringValue in chromeos/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « base/values.h ('k') | chrome/browser/chromeos/cros/cros_network_functions_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/cros_network_functions.h" 5 #include "chrome/browser/chromeos/cros/cros_network_functions.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_tokenizer.h" 10 #include "base/string_tokenizer.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 profile_entry_path)); 530 profile_entry_path));
531 } 531 }
532 532
533 void CrosRequestHiddenWifiNetworkProperties( 533 void CrosRequestHiddenWifiNetworkProperties(
534 const std::string& ssid, 534 const std::string& ssid,
535 const std::string& security, 535 const std::string& security,
536 const NetworkPropertiesCallback& callback) { 536 const NetworkPropertiesCallback& callback) {
537 base::DictionaryValue properties; 537 base::DictionaryValue properties;
538 properties.SetWithoutPathExpansion( 538 properties.SetWithoutPathExpansion(
539 flimflam::kModeProperty, 539 flimflam::kModeProperty,
540 new base::StringValue(flimflam::kModeManaged)); 540 base::Value::CreateStringValue(flimflam::kModeManaged));
541 properties.SetWithoutPathExpansion( 541 properties.SetWithoutPathExpansion(
542 flimflam::kTypeProperty, 542 flimflam::kTypeProperty,
543 new base::StringValue(flimflam::kTypeWifi)); 543 base::Value::CreateStringValue(flimflam::kTypeWifi));
544 properties.SetWithoutPathExpansion( 544 properties.SetWithoutPathExpansion(
545 flimflam::kSSIDProperty, 545 flimflam::kSSIDProperty,
546 new base::StringValue(ssid)); 546 base::Value::CreateStringValue(ssid));
547 properties.SetWithoutPathExpansion( 547 properties.SetWithoutPathExpansion(
548 flimflam::kSecurityProperty, 548 flimflam::kSecurityProperty,
549 new base::StringValue(security)); 549 base::Value::CreateStringValue(security));
550 // shill.Manger.GetService() will apply the property changes in 550 // shill.Manger.GetService() will apply the property changes in
551 // |properties| and return a new or existing service to OnGetService(). 551 // |properties| and return a new or existing service to OnGetService().
552 // OnGetService will then call GetProperties which will then call callback. 552 // OnGetService will then call GetProperties which will then call callback.
553 DBusThreadManager::Get()->GetShillManagerClient()->GetService( 553 DBusThreadManager::Get()->GetShillManagerClient()->GetService(
554 properties, base::Bind(&OnGetService, callback), 554 properties, base::Bind(&OnGetService, callback),
555 base::Bind(&IgnoreErrors)); 555 base::Bind(&IgnoreErrors));
556 } 556 }
557 557
558 void CrosRequestVirtualNetworkProperties( 558 void CrosRequestVirtualNetworkProperties(
559 const std::string& service_name, 559 const std::string& service_name,
560 const std::string& server_hostname, 560 const std::string& server_hostname,
561 const std::string& provider_type, 561 const std::string& provider_type,
562 const NetworkPropertiesCallback& callback) { 562 const NetworkPropertiesCallback& callback) {
563 base::DictionaryValue properties; 563 base::DictionaryValue properties;
564 properties.SetWithoutPathExpansion( 564 properties.SetWithoutPathExpansion(
565 flimflam::kTypeProperty, 565 flimflam::kTypeProperty,
566 new base::StringValue(flimflam::kTypeVPN)); 566 base::Value::CreateStringValue(flimflam::kTypeVPN));
567 properties.SetWithoutPathExpansion( 567 properties.SetWithoutPathExpansion(
568 flimflam::kProviderNameProperty, 568 flimflam::kProviderNameProperty,
569 new base::StringValue(service_name)); 569 base::Value::CreateStringValue(service_name));
570 properties.SetWithoutPathExpansion( 570 properties.SetWithoutPathExpansion(
571 flimflam::kProviderHostProperty, 571 flimflam::kProviderHostProperty,
572 new base::StringValue(server_hostname)); 572 base::Value::CreateStringValue(server_hostname));
573 properties.SetWithoutPathExpansion( 573 properties.SetWithoutPathExpansion(
574 flimflam::kProviderTypeProperty, 574 flimflam::kProviderTypeProperty,
575 new base::StringValue(provider_type)); 575 base::Value::CreateStringValue(provider_type));
576 // The actual value of Domain does not matter, so just use service_name. 576 // The actual value of Domain does not matter, so just use service_name.
577 properties.SetWithoutPathExpansion( 577 properties.SetWithoutPathExpansion(
578 flimflam::kVPNDomainProperty, 578 flimflam::kVPNDomainProperty,
579 new base::StringValue(service_name)); 579 base::Value::CreateStringValue(service_name));
580 580
581 // shill.Manger.GetService() will apply the property changes in 581 // shill.Manger.GetService() will apply the property changes in
582 // |properties| and pass a new or existing service to OnGetService(). 582 // |properties| and pass a new or existing service to OnGetService().
583 // OnGetService will then call GetProperties which will then call callback. 583 // OnGetService will then call GetProperties which will then call callback.
584 DBusThreadManager::Get()->GetShillManagerClient()->GetService( 584 DBusThreadManager::Get()->GetShillManagerClient()->GetService(
585 properties, base::Bind(&OnGetService, callback), 585 properties, base::Bind(&OnGetService, callback),
586 base::Bind(&IgnoreErrors)); 586 base::Bind(&IgnoreErrors));
587 } 587 }
588 588
589 void CrosRequestNetworkServiceDisconnect(const std::string& service_path) { 589 void CrosRequestNetworkServiceDisconnect(const std::string& service_path) {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 const std::string& carrier, 898 const std::string& carrier,
899 const NetworkOperationCallback& callback) { 899 const NetworkOperationCallback& callback) {
900 DBusThreadManager::Get()->GetShillDeviceClient()->SetCarrier( 900 DBusThreadManager::Get()->GetShillDeviceClient()->SetCarrier(
901 dbus::ObjectPath(device_path), carrier, 901 dbus::ObjectPath(device_path), carrier,
902 base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, 902 base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE,
903 std::string()), 903 std::string()),
904 base::Bind(&OnNetworkActionError, callback, device_path)); 904 base::Bind(&OnNetworkActionError, callback, device_path));
905 } 905 }
906 906
907 } // namespace chromeos 907 } // namespace chromeos
OLDNEW
« no previous file with comments | « base/values.h ('k') | chrome/browser/chromeos/cros/cros_network_functions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698