OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "components/translate/core/browser/translate_download_manager.h" | 5 #include "components/translate/core/browser/translate_download_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "components/translate/core/common/translate_pref_names.h" | 11 #include "components/translate/core/common/translate_pref_names.h" |
12 #include "components/translate/core/common/translate_switches.h" | 12 #include "components/translate/core/common/translate_switches.h" |
13 | 13 |
14 namespace translate { | 14 namespace translate { |
15 | 15 |
16 // static | 16 // static |
17 TranslateDownloadManager* TranslateDownloadManager::GetInstance() { | 17 TranslateDownloadManager* TranslateDownloadManager::GetInstance() { |
18 return Singleton<TranslateDownloadManager>::get(); | 18 return base::Singleton<TranslateDownloadManager>::get(); |
19 } | 19 } |
20 | 20 |
21 TranslateDownloadManager::TranslateDownloadManager() | 21 TranslateDownloadManager::TranslateDownloadManager() |
22 : language_list_(new TranslateLanguageList), | 22 : language_list_(new TranslateLanguageList), |
23 script_(new TranslateScript) {} | 23 script_(new TranslateScript) {} |
24 | 24 |
25 TranslateDownloadManager::~TranslateDownloadManager() {} | 25 TranslateDownloadManager::~TranslateDownloadManager() {} |
26 | 26 |
27 void TranslateDownloadManager::Shutdown() { | 27 void TranslateDownloadManager::Shutdown() { |
28 language_list_.reset(); | 28 language_list_.reset(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) { | 128 void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) { |
129 if (script_.get() == NULL) { | 129 if (script_.get() == NULL) { |
130 NOTREACHED(); | 130 NOTREACHED(); |
131 return; | 131 return; |
132 } | 132 } |
133 script_->set_expiration_delay(delay_ms); | 133 script_->set_expiration_delay(delay_ms); |
134 } | 134 } |
135 | 135 |
136 } // namespace translate | 136 } // namespace translate |
OLD | NEW |