| 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 "components/prefs/pref_service.h" | 10 #include "components/prefs/pref_service.h" |
| 11 #include "components/translate/core/common/translate_pref_names.h" | 11 #include "components/translate/core/browser/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 base::Singleton<TranslateDownloadManager>::get(); | 18 return base::Singleton<TranslateDownloadManager>::get(); |
| 19 } | 19 } |
| 20 | 20 |
| 21 TranslateDownloadManager::TranslateDownloadManager() | 21 TranslateDownloadManager::TranslateDownloadManager() |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) { | 127 void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) { |
| 128 if (script_.get() == NULL) { | 128 if (script_.get() == NULL) { |
| 129 NOTREACHED(); | 129 NOTREACHED(); |
| 130 return; | 130 return; |
| 131 } | 131 } |
| 132 script_->set_expiration_delay(delay_ms); | 132 script_->set_expiration_delay(delay_ms); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace translate | 135 } // namespace translate |
| OLD | NEW |