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

Side by Side Diff: chrome/browser/chromeos/login/helper.cc

Issue 1519883003: 1) Add basic configuration (network connection, language, keyboard layout, timezone) setup page. 2)… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the i18n-content HTML format in the html files Created 5 years 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 (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/login/helper.h" 5 #include "chrome/browser/chromeos/login/helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 const std::string& onc_spec, 163 const std::string& onc_spec,
164 const base::Closure& success_callback, 164 const base::Closure& success_callback,
165 const base::Closure& error_callback) const { 165 const base::Closure& error_callback) const {
166 std::string error; 166 std::string error;
167 scoped_ptr<base::Value> root = base::JSONReader::ReadAndReturnError( 167 scoped_ptr<base::Value> root = base::JSONReader::ReadAndReturnError(
168 onc_spec, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error); 168 onc_spec, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
169 169
170 base::DictionaryValue* toplevel_onc = nullptr; 170 base::DictionaryValue* toplevel_onc = nullptr;
171 if (!root || !root->GetAsDictionary(&toplevel_onc)) { 171 if (!root || !root->GetAsDictionary(&toplevel_onc)) {
172 LOG(ERROR) << "Invalid JSON Dictionary: " << error; 172 LOG(ERROR) << "Invalid JSON Dictionary: " << error;
173 error_callback.Run();
173 return; 174 return;
174 } 175 }
175 176
176 NetworkHandler::Get() 177 NetworkHandler::Get()
177 ->managed_network_configuration_handler() 178 ->managed_network_configuration_handler()
178 ->CreateConfiguration( 179 ->CreateConfiguration(
179 "", *toplevel_onc, 180 "", *toplevel_onc,
180 base::Bind(&NetworkStateHelper::OnCreateConfiguration, 181 base::Bind(&NetworkStateHelper::OnCreateConfiguration,
181 base::Unretained(this), success_callback, error_callback), 182 base::Unretained(this), success_callback, error_callback),
182 base::Bind(&NetworkStateHelper::OnCreateOrConnectNetworkFailed, 183 base::Bind(&NetworkStateHelper::OnCreateOrConnectNetworkFailed,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 243
243 return signin_partition->GetURLRequestContext(); 244 return signin_partition->GetURLRequestContext();
244 } 245 }
245 246
246 return ProfileHelper::GetSigninProfile()->GetRequestContext(); 247 return ProfileHelper::GetSigninProfile()->GetRequestContext();
247 } 248 }
248 249
249 } // namespace login 250 } // namespace login
250 251
251 } // namespace chromeos 252 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/login/screens/controller_pairing_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698