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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 8749016: Make SDCH classes IO-thread-only. Remove TSan suppression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win shared compile issue. Merge to LKGR. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // the BrowserProcess. Since AutomationProvider may have some active 177 // the BrowserProcess. Since AutomationProvider may have some active
178 // notification observers, it is essential that it gets destroyed before the 178 // notification observers, it is essential that it gets destroyed before the
179 // NotificationService. NotificationService won't be destroyed until after 179 // NotificationService. NotificationService won't be destroyed until after
180 // this destructor is run. 180 // this destructor is run.
181 automation_provider_list_.reset(); 181 automation_provider_list_.reset();
182 182
183 // We need to shutdown the SdchDictionaryFetcher as it regularly holds 183 // We need to shutdown the SdchDictionaryFetcher as it regularly holds
184 // a pointer to a URLFetcher, and that URLFetcher (upon destruction) will do 184 // a pointer to a URLFetcher, and that URLFetcher (upon destruction) will do
185 // a PostDelayedTask onto the IO thread. This shutdown call will both discard 185 // a PostDelayedTask onto the IO thread. This shutdown call will both discard
186 // any pending URLFetchers, and avoid creating any more. 186 // any pending URLFetchers, and avoid creating any more.
187 SdchDictionaryFetcher::Shutdown(); 187 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
188 base::Bind(&SdchDictionaryFetcher::Shutdown));
188 189
189 // We need to destroy the MetricsService, GoogleURLTracker, 190 // We need to destroy the MetricsService, GoogleURLTracker,
190 // IntranetRedirectDetector, and SafeBrowsing ClientSideDetectionService 191 // IntranetRedirectDetector, and SafeBrowsing ClientSideDetectionService
191 // (owned by the SafeBrowsingService) before the io_thread_ gets destroyed, 192 // (owned by the SafeBrowsingService) before the io_thread_ gets destroyed,
192 // since their destructors can call the URLFetcher destructor, which does a 193 // since their destructors can call the URLFetcher destructor, which does a
193 // PostDelayedTask operation on the IO thread. 194 // PostDelayedTask operation on the IO thread.
194 // (The IO thread will handle that URLFetcher operation before going away.) 195 // (The IO thread will handle that URLFetcher operation before going away.)
195 metrics_service_.reset(); 196 metrics_service_.reset();
196 google_url_tracker_.reset(); 197 google_url_tracker_.reset();
197 intranet_redirect_detector_.reset(); 198 intranet_redirect_detector_.reset();
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 } 1009 }
1009 1010
1010 void BrowserProcessImpl::OnAutoupdateTimer() { 1011 void BrowserProcessImpl::OnAutoupdateTimer() {
1011 if (CanAutorestartForUpdate()) { 1012 if (CanAutorestartForUpdate()) {
1012 DLOG(WARNING) << "Detected update. Restarting browser."; 1013 DLOG(WARNING) << "Detected update. Restarting browser.";
1013 RestartBackgroundInstance(); 1014 RestartBackgroundInstance();
1014 } 1015 }
1015 } 1016 }
1016 1017
1017 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1018 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698