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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 19555005: Clean up TranslateManager's URL fetchers so that they are destroyed in the correct thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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 | chrome/browser/translate/translate_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index b8e52040305da94c716d14016300a9bda7721e20..0e5aa2015db1f79061f4be98050d2f5127ab98ca 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1692,11 +1692,10 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() {
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
chrome_extra_parts_[i]->PostMainMessageLoopRun();
- // Some tests don't set parameters.ui_task, so they started translate
- // language fetch that was never completed so we need to cleanup here
+ // TranslateManager's URL fetchers should be destructed in the main thread
// otherwise it will be done by the destructor in a wrong thread.
- if (parameters().ui_task == NULL && translate_manager_ != NULL)
- translate_manager_->CleanupPendingUlrFetcher();
+ if (translate_manager_ != NULL)
+ translate_manager_->CleanupPendingUrlFetcher();
if (notify_result_ == ProcessSingleton::PROCESS_NONE)
process_singleton_->Cleanup();
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698