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

Side by Side Diff: chrome/browser/translate/translate_service.cc

Issue 145023015: Introduce TranslateService and TranslateDownloadManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/translate/translate_service.h"
6
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/translate/translate_manager.h"
9 #include "components/translate/core/browser/translate_download_manager.h"
10
11 // static
12 void TranslateService::Initialize() {
13 TranslateManager::GetInstance();
14 TranslateDownloadManager::GetInstance()->set_request_context(
15 g_browser_process->system_request_context());
16 }
17
18 // static
19 void TranslateService::Shutdown(bool cleanup_pending_fetcher_for_testing) {
20 if (cleanup_pending_fetcher_for_testing)
21 TranslateManager::GetInstance()->CleanupPendingUlrFetcher();
22 TranslateDownloadManager::GetInstance()->set_request_context(NULL);
23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698