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

Side by Side Diff: components/translate/core/browser/translate_download_manager.cc

Issue 2819793002: Translate: do not show the context menu entry when the feature is disabled (Closed)
Patch Set: some more include path changes for ios/android Created 3 years, 8 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
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
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
OLDNEW
« no previous file with comments | « components/translate/core/browser/BUILD.gn ('k') | components/translate/core/browser/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698