| 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/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 9 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 10 #include "components/translate/core/common/translate_pref_names.h" | 11 #include "components/translate/core/common/translate_pref_names.h" |
| 11 #include "components/translate/core/common/translate_switches.h" | 12 #include "components/translate/core/common/translate_switches.h" |
| 12 | 13 |
| 13 // static | 14 // static |
| 14 TranslateDownloadManager* TranslateDownloadManager::GetInstance() { | 15 TranslateDownloadManager* TranslateDownloadManager::GetInstance() { |
| 15 return Singleton<TranslateDownloadManager>::get(); | 16 return Singleton<TranslateDownloadManager>::get(); |
| 16 } | 17 } |
| 17 | 18 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 script_->Clear(); | 118 script_->Clear(); |
| 118 } | 119 } |
| 119 | 120 |
| 120 void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) { | 121 void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) { |
| 121 if (script_.get() == NULL) { | 122 if (script_.get() == NULL) { |
| 122 NOTREACHED(); | 123 NOTREACHED(); |
| 123 return; | 124 return; |
| 124 } | 125 } |
| 125 script_->set_expiration_delay(delay_ms); | 126 script_->set_expiration_delay(delay_ms); |
| 126 } | 127 } |
| OLD | NEW |