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

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

Issue 21046008: Convert all connect code to use NetworkHandler instead of NetworkLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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/chromeos/chromeos_version.h" 7 #include "base/chromeos/chromeos_version.h"
8 #include "base/i18n/icu_encoding_detection.h" 8 #include "base/i18n/icu_encoding_detection.h"
9 #include "base/i18n/icu_string_conversions.h" 9 #include "base/i18n/icu_string_conversions.h"
10 #include "base/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
11 #include "base/json/json_writer.h" // for debug output only. 11 #include "base/json/json_writer.h" // for debug output only.
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/utf_string_conversion_utils.h" 13 #include "base/strings/utf_string_conversion_utils.h"
14 #include "chrome/browser/chromeos/cros/native_network_constants.h" 14 #include "chrome/browser/chromeos/cros/native_network_constants.h"
15 #include "chrome/browser/chromeos/cros/native_network_parser.h" 15 #include "chrome/browser/chromeos/cros/native_network_parser.h"
16 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h" 16 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h"
17 #include "chrome/browser/chromeos/cros/network_library_impl_stub.h" 17 #include "chrome/browser/chromeos/cros/network_library_impl_stub.h"
18 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
18 #include "chrome/common/net/x509_certificate_model.h" 19 #include "chrome/common/net/x509_certificate_model.h"
19 #include "chromeos/network/certificate_pattern.h" 20 #include "chromeos/network/certificate_pattern.h"
20 #include "chromeos/network/certificate_pattern_matcher.h" 21 #include "chromeos/network/certificate_pattern_matcher.h"
21 #include "chromeos/network/cros_network_functions.h" 22 #include "chromeos/network/cros_network_functions.h"
22 #include "chromeos/network/network_state_handler.h" 23 #include "chromeos/network/network_state_handler.h"
23 #include "chromeos/network/onc/onc_utils.h" 24 #include "chromeos/network/onc/onc_utils.h"
24 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
25 #include "grit/ash_strings.h" 26 #include "grit/ash_strings.h"
26 #include "grit/generated_resources.h" 27 #include "grit/generated_resources.h"
27 #include "net/base/url_util.h" 28 #include "net/base/url_util.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 unique_id_ = name_; 325 unique_id_ = name_;
325 } 326 }
326 327
327 bool Network::RequiresUserProfile() const { 328 bool Network::RequiresUserProfile() const {
328 return false; 329 return false;
329 } 330 }
330 331
331 void Network::CopyCredentialsFromRemembered(Network* remembered) { 332 void Network::CopyCredentialsFromRemembered(Network* remembered) {
332 } 333 }
333 334
335 void Network::SetEnrollmentDelegate(EnrollmentDelegate* delegate) {
336 enrollment_delegate_.reset(delegate);
337 }
338
334 void Network::SetValueProperty(const char* prop, const base::Value& value) { 339 void Network::SetValueProperty(const char* prop, const base::Value& value) {
335 DCHECK(prop); 340 DCHECK(prop);
336 if (!EnsureRunningOnChromeOS()) 341 if (!EnsureRunningOnChromeOS())
337 return; 342 return;
338 CrosSetNetworkServiceProperty(service_path_, prop, value); 343 CrosSetNetworkServiceProperty(service_path_, prop, value);
339 // Ensure NetworkStateHandler properties are up-to-date. 344 // Ensure NetworkStateHandler properties are up-to-date.
340 if (NetworkHandler::IsInitialized()) { 345 if (NetworkHandler::IsInitialized()) {
341 NetworkHandler::Get()->network_state_handler()->RequestUpdateForNetwork( 346 NetworkHandler::Get()->network_state_handler()->RequestUpdateForNetwork(
342 service_path()); 347 service_path());
343 } 348 }
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 } 1391 }
1387 1392
1388 // static 1393 // static
1389 void NetworkLibrary::SetForTesting(NetworkLibrary* library) { 1394 void NetworkLibrary::SetForTesting(NetworkLibrary* library) {
1390 if (g_network_library) 1395 if (g_network_library)
1391 delete g_network_library; 1396 delete g_network_library;
1392 g_network_library = library; 1397 g_network_library = library;
1393 } 1398 }
1394 1399
1395 } // namespace chromeos 1400 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.h ('k') | chrome/browser/chromeos/cros/network_library_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698