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

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

Issue 2890383003: Bootstrapping: Send meaningful error code/message from Slave to Master (Closed)
Patch Set: . Created 3 years, 7 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 (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 // This file contains helper functions used by Chromium OS login. 5 // This file contains helper functions used by Chromium OS login.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_
8 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ 8 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "chromeos/network/network_handler_callbacks.h"
achuithb 2017/05/25 19:25:53 Please forward declare ErrorCallback instead
xdai1 2017/06/08 22:18:40 It's a type def so can't be forward declared.
15 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
16 #include "ui/views/view.h" 17 #include "ui/views/view.h"
17 18
18 namespace gfx { 19 namespace gfx {
19 class Rect; 20 class Rect;
20 class Size; 21 class Size;
21 } // namespace gfx 22 } // namespace gfx
22 23
23 namespace content { 24 namespace content {
24 class StoragePartition; 25 class StoragePartition;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Get current connected Wifi network configuration. Used in shark/remora 67 // Get current connected Wifi network configuration. Used in shark/remora
67 // mode. Note currently only unsecured Wifi network configuration can be 68 // mode. Note currently only unsecured Wifi network configuration can be
68 // gotten since there is no way to get password for a secured Wifi newwork 69 // gotten since there is no way to get password for a secured Wifi newwork
69 // in Cros for security reasons. 70 // in Cros for security reasons.
70 virtual void GetConnectedWifiNetwork(std::string* out_onc_spec); 71 virtual void GetConnectedWifiNetwork(std::string* out_onc_spec);
71 72
72 // Add and apply a network configuration. Used in shark/remora mode. 73 // Add and apply a network configuration. Used in shark/remora mode.
73 virtual void CreateAndConnectNetworkFromOnc( 74 virtual void CreateAndConnectNetworkFromOnc(
74 const std::string& onc_spec, 75 const std::string& onc_spec,
75 const base::Closure& success_callback, 76 const base::Closure& success_callback,
76 const base::Closure& error_callback) const; 77 const network_handler::ErrorCallback& error_callback) const;
77 78
78 // Returns true if the default network is in connected state. 79 // Returns true if the default network is in connected state.
79 virtual bool IsConnected() const; 80 virtual bool IsConnected() const;
80 81
81 // Returns true if the default network is in connecting state. 82 // Returns true if the default network is in connecting state.
82 virtual bool IsConnecting() const; 83 virtual bool IsConnecting() const;
83 84
84 private: 85 private:
85 void OnCreateConfiguration(const base::Closure& success_callback, 86 void OnCreateConfiguration(
86 const base::Closure& error_callback, 87 const base::Closure& success_callback,
87 const std::string& service_path, 88 const network_handler::ErrorCallback& error_callback,
88 const std::string& guid) const; 89 const std::string& service_path,
89 void OnCreateOrConnectNetworkFailed( 90 const std::string& guid) const;
90 const base::Closure& error_callback,
91 const std::string& error_name,
92 std::unique_ptr<base::DictionaryValue> error_data) const;
93 91
94 DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper); 92 DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper);
95 }; 93 };
96 94
97 // 95 //
98 // Webview based login helpers. 96 // Webview based login helpers.
99 // 97 //
100 98
101 // Returns the storage partition for the sign-in webview. Note the function gets 99 // Returns the storage partition for the sign-in webview. Note the function gets
102 // the partition via the sign-in WebContents thus returns nullptr if the sign-in 100 // the partition via the sign-in WebContents thus returns nullptr if the sign-in
103 // webui is torn down. 101 // webui is torn down.
104 content::StoragePartition* GetSigninPartition(); 102 content::StoragePartition* GetSigninPartition();
105 103
106 // Returns the request context that contains sign-in cookies. For old iframe 104 // Returns the request context that contains sign-in cookies. For old iframe
107 // based flow, the context of the sign-in profile is returned. For webview based 105 // based flow, the context of the sign-in profile is returned. For webview based
108 // flow, the context of the sign-in webview storage partition is returned. 106 // flow, the context of the sign-in webview storage partition is returned.
109 net::URLRequestContextGetter* GetSigninContext(); 107 net::URLRequestContextGetter* GetSigninContext();
110 108
111 } // namespace login 109 } // namespace login
112 110
113 } // namespace chromeos 111 } // namespace chromeos
114 112
115 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ 113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/helper.cc » ('j') | chrome/browser/chromeos/login/helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698