Chromium Code Reviews| Index: chrome/browser/translate/translate_service.cc |
| diff --git a/chrome/browser/translate/translate_service.cc b/chrome/browser/translate/translate_service.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c8d51d7a8df407923700d26856b02b999df447ce |
| --- /dev/null |
| +++ b/chrome/browser/translate/translate_service.cc |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/translate/translate_service.h" |
| + |
| +#include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/translate/translate_manager.h" |
| +#include "components/translate/core/browser/translate_download_manager.h" |
| + |
| +// static |
| +void TranslateService::Initialize() { |
| + TranslateManager::GetInstance(); |
| + TranslateDownloadManager::GetInstance()->set_request_context( |
|
blundell
2014/01/24 17:52:43
Is this class going to become more meaty in the fu
droger
2014/01/27 14:13:43
Yes, it is. See the followup CL:
https://coderevie
|
| + g_browser_process->system_request_context()); |
| +} |
| + |
| +// static |
| +void TranslateService::Shutdown(bool cleanup_pending_fetcher) { |
| + if (cleanup_pending_fetcher) |
| + TranslateManager::GetInstance()->CleanupPendingUlrFetcher(); |
|
blundell
2014/01/24 17:52:43
Could you file a bug to rename this CleanupPending
droger
2014/01/27 14:13:43
Why do you want to rename this?
|
| + TranslateDownloadManager::GetInstance()->set_request_context(NULL); |
| +} |