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

Side by Side Diff: chrome/browser/sync/test/integration/wifi_credentials_helper_chromeos.cc

Issue 1779633002: Invoke createNetwork() callback with GUID, not service name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more trybot failures Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sync/test/integration/wifi_credentials_helper_chromeos. h" 5 #include "chrome/browser/sync/test/integration/wifi_credentials_helper_chromeos. h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 void AddWifiCredentialToProfileChromeOs( 101 void AddWifiCredentialToProfileChromeOs(
102 const content::BrowserContext* browser_context, 102 const content::BrowserContext* browser_context,
103 const WifiCredential& credential) { 103 const WifiCredential& credential) {
104 DCHECK(browser_context); 104 DCHECK(browser_context);
105 scoped_ptr<base::DictionaryValue> onc_properties = 105 scoped_ptr<base::DictionaryValue> onc_properties =
106 credential.ToOncProperties(); 106 credential.ToOncProperties();
107 CHECK(onc_properties) << "Failed to generate ONC properties for " 107 CHECK(onc_properties) << "Failed to generate ONC properties for "
108 << credential.ToString(); 108 << credential.ToString();
109 GetManagedNetworkConfigurationHandler() 109 GetManagedNetworkConfigurationHandler()->CreateConfiguration(
110 ->CreateConfiguration( 110 ChromeOsUserHashForBrowserContext(*browser_context), *onc_properties,
111 ChromeOsUserHashForBrowserContext(*browser_context), 111 ::chromeos::network_handler::ServiceResultCallback(),
112 *onc_properties, 112 base::Bind(LogCreateConfigurationFailure,
113 ::chromeos::network_handler::StringResultCallback(), 113 base::StringPrintf("Failed to add credential %s",
114 base::Bind(LogCreateConfigurationFailure, 114 credential.ToString().c_str())));
115 base::StringPrintf("Failed to add credential %s",
116 credential.ToString().c_str())));
117 base::MessageLoop::current()->RunUntilIdle(); 115 base::MessageLoop::current()->RunUntilIdle();
118 } 116 }
119 117
120 WifiCredentialSet GetWifiCredentialsForProfileChromeOs( 118 WifiCredentialSet GetWifiCredentialsForProfileChromeOs(
121 const content::BrowserContext* browser_context) { 119 const content::BrowserContext* browser_context) {
122 DCHECK(browser_context); 120 DCHECK(browser_context);
123 return wifi_sync::GetWifiCredentialsForShillProfile( 121 return wifi_sync::GetWifiCredentialsForShillProfile(
124 GetNetworkStateHandler(), 122 GetNetworkStateHandler(),
125 ShillProfilePathForBrowserContext(*browser_context)); 123 ShillProfilePathForBrowserContext(*browser_context));
126 } 124 }
127 125
128 } // namespace chromeos 126 } // namespace chromeos
129 127
130 } // namespace wifi_credentials_helper 128 } // namespace wifi_credentials_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698