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

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

Issue 159883002: Move TranslatePrefs to the Translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceptLanguages
Patch Set: Fix ChromeOS browsertests Created 6 years, 10 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/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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698