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

Unified Diff: chrome/browser/ui/webui/chromeos/login/l10n_util.cc

Issue 641693008: Fix crash in ResolveLanguageListOnBlockingPool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/l10n_util.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
index d125353e168015da6ddb0bf48af6facdf23c3daa..1613b4d2485d3884fdc4faaba1bbd940d3ebb14c 100644
--- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
+++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
@@ -432,18 +432,22 @@ void ResolveUILanguageList(
scoped_ptr<std::string> new_language_list_locale(new std::string);
scoped_ptr<std::string> new_selected_language(new std::string);
- content::BrowserThread::GetBlockingPool()->PostTaskAndReply(
- FROM_HERE,
+ base::Closure resolve_on_pool =
base::Bind(&ResolveLanguageListOnBlockingPool,
base::Owned(language_switch_result.release()),
base::Unretained(new_language_list.get()),
base::Unretained(new_language_list_locale.get()),
- base::Unretained(new_selected_language.get())),
+ base::Unretained(new_selected_language.get()));
+
+ base::Closure on_language_list_resolved =
base::Bind(&OnLanguageListResolved,
callback,
base::Passed(new_language_list.Pass()),
base::Passed(new_language_list_locale.Pass()),
- base::Passed(new_selected_language.Pass())));
+ base::Passed(new_selected_language.Pass()));
+
+ content::BrowserThread::GetBlockingPool()->PostTaskAndReply(
+ FROM_HERE, resolve_on_pool, on_language_list_resolved);
}
scoped_ptr<base::ListValue> GetMinimalUILanguageList() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698