OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "content/public/browser/utility_process_host.h" | 11 #include "content/public/browser/utility_process_host.h" |
12 #include "content/public/browser/utility_process_host_client.h" | 12 #include "content/public/browser/utility_process_host_client.h" |
13 | 13 |
14 namespace local_discovery { | 14 namespace local_discovery { |
15 namespace wifi { | 15 namespace wifi { |
16 | 16 |
17 class CredentialGetterWin : public content::UtilityProcessHostClient { | 17 class CredentialGetterWin : public content::UtilityProcessHostClient { |
18 public: | 18 public: |
19 typedef base::Callback<void(bool success, const std::string& key)> | 19 typedef base::Callback<void(bool success, const std::string& key)> |
20 CredentialsCallback; | 20 CredentialsCallback; |
(...skipping 12 matching lines...) Expand all Loading... |
33 void OnProcessLaunchFailed() override; | 33 void OnProcessLaunchFailed() override; |
34 | 34 |
35 // IPC message handlers. | 35 // IPC message handlers. |
36 void OnGotCredentials(const std::string& key_data, bool success); | 36 void OnGotCredentials(const std::string& key_data, bool success); |
37 | 37 |
38 void StartOnIOThread(const std::string& network_guid); | 38 void StartOnIOThread(const std::string& network_guid); |
39 | 39 |
40 void PostCallback(bool success, const std::string& key_data); | 40 void PostCallback(bool success, const std::string& key_data); |
41 | 41 |
42 CredentialsCallback callback_; | 42 CredentialsCallback callback_; |
43 scoped_refptr<base::MessageLoopProxy> callback_runner_; | 43 scoped_refptr<base::SingleThreadTaskRunner> callback_runner_; |
44 }; | 44 }; |
45 | 45 |
46 } // namespace wifi | 46 } // namespace wifi |
47 } // namespace local_discovery | 47 } // namespace local_discovery |
48 | 48 |
49 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_ | 49 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_ |
OLD | NEW |