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

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

Issue 818103002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 27 matching lines...) Expand all
38 return; 38 return;
39 } 39 }
40 40
41 language_list->RequestLanguageList(); 41 language_list->RequestLanguageList();
42 } 42 }
43 43
44 // static 44 // static
45 void TranslateDownloadManager::RequestLanguageList(PrefService* prefs) { 45 void TranslateDownloadManager::RequestLanguageList(PrefService* prefs) {
46 // We don't want to do this when translate is disabled. 46 // We don't want to do this when translate is disabled.
47 DCHECK(prefs != NULL); 47 DCHECK(prefs != NULL);
48 if (CommandLine::ForCurrentProcess()->HasSwitch( 48 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
49 translate::switches::kDisableTranslate) || 49 translate::switches::kDisableTranslate) ||
50 !prefs->GetBoolean(prefs::kEnableTranslate)) { 50 !prefs->GetBoolean(prefs::kEnableTranslate)) {
51 return; 51 return;
52 } 52 }
53 53
54 RequestLanguageList(); 54 RequestLanguageList();
55 } 55 }
56 56
57 // static 57 // static
58 void TranslateDownloadManager::GetSupportedLanguages( 58 void TranslateDownloadManager::GetSupportedLanguages(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/signin/core/common/profile_management_switches.cc ('k') | components/translate/core/browser/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698