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

Side by Side Diff: chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc

Issue 1112573002: [chrome/browser/extensions] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving ng browser unittest issues Created 5 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 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 #include "chrome/browser/extensions/api/networking_private/networking_private_cr edentials_getter.h" 5 #include "chrome/browser/extensions/api/networking_private/networking_private_cr edentials_getter.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
11 #include "chrome/common/extensions/api/networking_private/networking_private_cry pto.h" 11 #include "chrome/common/extensions/api/networking_private/networking_private_cry pto.h"
12 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" 12 #include "chrome/common/extensions/chrome_utility_extensions_messages.h"
13 #include "chrome/grit/generated_resources.h" 13 #include "chrome/grit/generated_resources.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/utility_process_host.h" 15 #include "content/public/browser/utility_process_host.h"
16 #include "content/public/browser/utility_process_host_client.h" 16 #include "content/public/browser/utility_process_host_client.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 18
19 using content::BrowserThread; 19 using content::BrowserThread;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 callback_.Run("", "Get Credentials Failed"); 95 callback_.Run("", "Get Credentials Failed");
96 } 96 }
97 } 97 }
98 98
99 void CredentialsGetterHostClient::StartProcessOnIOThread( 99 void CredentialsGetterHostClient::StartProcessOnIOThread(
100 const std::string& network_guid, 100 const std::string& network_guid,
101 const NetworkingPrivateCredentialsGetter::CredentialsCallback& callback) { 101 const NetworkingPrivateCredentialsGetter::CredentialsCallback& callback) {
102 DCHECK_CURRENTLY_ON(BrowserThread::IO); 102 DCHECK_CURRENTLY_ON(BrowserThread::IO);
103 callback_ = callback; 103 callback_ = callback;
104 UtilityProcessHost* host = 104 UtilityProcessHost* host =
105 UtilityProcessHost::Create(this, base::MessageLoopProxy::current()); 105 UtilityProcessHost::Create(this, base::ThreadTaskRunnerHandle::Get());
106 host->SetName(l10n_util::GetStringUTF16( 106 host->SetName(l10n_util::GetStringUTF16(
107 IDS_UTILITY_PROCESS_WIFI_CREDENTIALS_GETTER_NAME)); 107 IDS_UTILITY_PROCESS_WIFI_CREDENTIALS_GETTER_NAME));
108 host->ElevatePrivileges(); 108 host->ElevatePrivileges();
109 host->Send(new ChromeUtilityHostMsg_GetWiFiCredentials(network_guid)); 109 host->Send(new ChromeUtilityHostMsg_GetWiFiCredentials(network_guid));
110 } 110 }
111 111
112 } // namespace 112 } // namespace
113 113
114 namespace extensions { 114 namespace extensions {
115 115
(...skipping 30 matching lines...) Expand all
146 146
147 NetworkingPrivateCredentialsGetterWin:: 147 NetworkingPrivateCredentialsGetterWin::
148 ~NetworkingPrivateCredentialsGetterWin() {} 148 ~NetworkingPrivateCredentialsGetterWin() {}
149 149
150 NetworkingPrivateCredentialsGetter* 150 NetworkingPrivateCredentialsGetter*
151 NetworkingPrivateCredentialsGetter::Create() { 151 NetworkingPrivateCredentialsGetter::Create() {
152 return new NetworkingPrivateCredentialsGetterWin(); 152 return new NetworkingPrivateCredentialsGetterWin();
153 } 153 }
154 154
155 } // namespace extensions 155 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698