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

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

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes Created 8 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 | 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/cros_network_functions.h" 19 #include "chrome/browser/chromeos/cros/cros_network_functions.h"
20 #include "chrome/browser/chromeos/cros/network_constants.h" 20 #include "chrome/browser/chromeos/cros/network_constants.h"
21 #include "chrome/browser/chromeos/cros/network_ui_data.h" 21 #include "chrome/browser/chromeos/cros/network_ui_data.h"
22 #include "chromeos/network/onc/onc_constants.h"
22 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
23 24
24 namespace base { 25 namespace base {
25 class DictionaryValue; 26 class DictionaryValue;
26 class Value; 27 class Value;
27 } // namespace base 28 } // namespace base
28 29
29 namespace chromeos { 30 namespace chromeos {
30 31
31 class NetworkDeviceParser; 32 class NetworkDeviceParser;
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 // This will connect to a preferred network if the currently connected 1683 // This will connect to a preferred network if the currently connected
1683 // network is not preferred. This should be called when the active profile 1684 // network is not preferred. This should be called when the active profile
1684 // changes. 1685 // changes.
1685 virtual void SwitchToPreferredNetwork() = 0; 1686 virtual void SwitchToPreferredNetwork() = 0;
1686 1687
1687 // Load networks from an Open Network Configuration blob. 1688 // Load networks from an Open Network Configuration blob.
1688 // If there was an error, this will return false and |error| will be set to 1689 // If there was an error, this will return false and |error| will be set to
1689 // the error message. 1690 // the error message.
1690 virtual bool LoadOncNetworks(const std::string& onc_blob, 1691 virtual bool LoadOncNetworks(const std::string& onc_blob,
1691 const std::string& passcode, 1692 const std::string& passcode,
1692 NetworkUIData::ONCSource source, 1693 onc::ONCSource source,
1693 bool allow_web_trust_from_policy, 1694 bool allow_web_trust_from_policy) = 0;
1694 std::string* error) = 0;
1695 1695
1696 // This sets the active network for the network type. Note: priority order 1696 // This sets the active network for the network type. Note: priority order
1697 // is unchanged (i.e. if a wifi network is set to active, but an ethernet 1697 // is unchanged (i.e. if a wifi network is set to active, but an ethernet
1698 // network is still active, active_network() will still return the ethernet 1698 // network is still active, active_network() will still return the ethernet
1699 // network). Other networks of the same type will become inactive. 1699 // network). Other networks of the same type will become inactive.
1700 // Used for testing. 1700 // Used for testing.
1701 virtual bool SetActiveNetwork(ConnectionType type, 1701 virtual bool SetActiveNetwork(ConnectionType type,
1702 const std::string& service_path) = 0; 1702 const std::string& service_path) = 0;
1703 1703
1704 // Factory function, creates a new instance and returns ownership. 1704 // Factory function, creates a new instance and returns ownership.
1705 // For normal usage, access the singleton via CrosLibrary::Get(). 1705 // For normal usage, access the singleton via CrosLibrary::Get().
1706 static NetworkLibrary* GetImpl(bool stub); 1706 static NetworkLibrary* GetImpl(bool stub);
1707 }; 1707 };
1708 1708
1709 } // namespace chromeos 1709 } // namespace chromeos
1710 1710
1711 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 1711 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698