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

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

Issue 13035003: Added a PolicyCertVerifier that uses the trust anchors from the ONC policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed non-chromeos builds Created 7 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 | 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "base/timer.h" 18 #include "base/timer.h"
19 #include "chrome/browser/chromeos/cros/network_constants.h" 19 #include "chrome/browser/chromeos/cros/network_constants.h"
20 #include "chrome/browser/chromeos/cros/network_ui_data.h" 20 #include "chrome/browser/chromeos/cros/network_ui_data.h"
21 #include "chromeos/network/network_ip_config.h" 21 #include "chromeos/network/network_ip_config.h"
22 #include "chromeos/network/network_util.h" 22 #include "chromeos/network/network_util.h"
23 #include "chromeos/network/onc/onc_constants.h" 23 #include "chromeos/network/onc/onc_constants.h"
24 #include "net/base/x509_certificate.h"
24 25
25 namespace base { 26 namespace base {
26 class DictionaryValue; 27 class DictionaryValue;
27 class Value; 28 class Value;
28 } // namespace base 29 } // namespace base
29 30
30 namespace chromeos { 31 namespace chromeos {
31 32
32 class NetworkDeviceParser; 33 class NetworkDeviceParser;
33 class NetworkParser; 34 class NetworkParser;
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 const std::string& service_path, 1719 const std::string& service_path,
1719 const NetworkServicePropertiesCallback& callback) = 0; 1720 const NetworkServicePropertiesCallback& callback) = 0;
1720 1721
1721 // This will connect to a preferred network if the currently connected 1722 // This will connect to a preferred network if the currently connected
1722 // network is not preferred. This should be called when the active profile 1723 // network is not preferred. This should be called when the active profile
1723 // changes. 1724 // changes.
1724 virtual void SwitchToPreferredNetwork() = 0; 1725 virtual void SwitchToPreferredNetwork() = 0;
1725 1726
1726 // Load networks from an Open Network Configuration blob. 1727 // Load networks from an Open Network Configuration blob.
1727 // If there was an error, returns false. 1728 // If there was an error, returns false.
1728 virtual bool LoadOncNetworks(const std::string& onc_blob, 1729 virtual bool LoadOncNetworks(
1729 const std::string& passcode, 1730 const std::string& onc_blob,
1730 onc::ONCSource source, 1731 const std::string& passcode,
1731 bool allow_web_trust_from_policy) = 0; 1732 onc::ONCSource source,
1733 net::CertificateList* web_trust_certificates) = 0;
Ryan Sleevi 2013/03/25 21:09:53 The name "web_trust_certificates" is going to be v
Joao da Silva 2013/03/31 19:22:14 Good point. LoadOncNetworks() can also load onc fr
1732 1734
1733 // This sets the active network for the network type. Note: priority order 1735 // This sets the active network for the network type. Note: priority order
1734 // is unchanged (i.e. if a wifi network is set to active, but an ethernet 1736 // is unchanged (i.e. if a wifi network is set to active, but an ethernet
1735 // network is still active, active_network() will still return the ethernet 1737 // network is still active, active_network() will still return the ethernet
1736 // network). Other networks of the same type will become inactive. 1738 // network). Other networks of the same type will become inactive.
1737 // Used for testing. 1739 // Used for testing.
1738 virtual bool SetActiveNetwork(ConnectionType type, 1740 virtual bool SetActiveNetwork(ConnectionType type,
1739 const std::string& service_path) = 0; 1741 const std::string& service_path) = 0;
1740 1742
1741 // Factory function, creates a new instance and returns ownership. 1743 // Factory function, creates a new instance and returns ownership.
1742 // For normal usage, access the singleton via CrosLibrary::Get(). 1744 // For normal usage, access the singleton via CrosLibrary::Get().
1743 static NetworkLibrary* GetImpl(bool stub); 1745 static NetworkLibrary* GetImpl(bool stub);
1744 }; 1746 };
1745 1747
1746 } // namespace chromeos 1748 } // namespace chromeos
1747 1749
1748 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 1750 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698