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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 10392007: Restoring the chrome variatioons client, with a fix for browser_test failures caused by it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved comment Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index e3a7bb5055245a185bb95fb5f281468dcb9b9bea..ef593ea94e60dbc7ebf5e887c8da000350babcdf 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -36,6 +36,7 @@
#include "chrome/browser/io_thread.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/metrics/thread_watcher.h"
+#include "chrome/browser/metrics/variations_service.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/net/crl_set_fetcher.h"
#include "chrome/browser/net/sdch_dictionary_fetcher.h"
@@ -185,13 +186,14 @@ void BrowserProcessImpl::StartTearDown() {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&SdchDictionaryFetcher::Shutdown));
- // We need to destroy the MetricsService, IntranetRedirectDetector, and
- // SafeBrowsing ClientSideDetectionService (owned by the SafeBrowsingService)
- // before the io_thread_ gets destroyed, since their destructors can call the
- // URLFetcher destructor, which does a PostDelayedTask operation on the IO
- // thread. (The IO thread will handle that URLFetcher operation before going
- // away.)
+ // We need to destroy the MetricsService, VariationsService,
+ // IntranetRedirectDetector, and SafeBrowsing ClientSideDetectionService
+ // (owned by the SafeBrowsingService) before the io_thread_ gets destroyed,
+ // since their destructors can call the URLFetcher destructor, which does a
+ // PostDelayedTask operation on the IO thread. (The IO thread will handle that
+ // URLFetcher operation before going away.)
metrics_service_.reset();
+ variations_service_.reset();
intranet_redirect_detector_.reset();
#if defined(ENABLE_SAFE_BROWSING)
if (safe_browsing_service_.get()) {
@@ -395,6 +397,13 @@ net::URLRequestContextGetter* BrowserProcessImpl::system_request_context() {
return io_thread()->system_url_request_context_getter();
}
+VariationsService* BrowserProcessImpl::variations_service() {
+ DCHECK(CalledOnValidThread());
+ if (!variations_service_.get())
+ variations_service_.reset(new VariationsService());
+ return variations_service_.get();
+}
+
#if defined(OS_CHROMEOS)
chromeos::OomPriorityManager* BrowserProcessImpl::oom_priority_manager() {
DCHECK(CalledOnValidThread());
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698