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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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"
11 #include "components/translate/core/common/translate_pref_names.h" 11 #include "components/translate/core/common/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 Singleton<TranslateDownloadManager>::get(); 18 return base::Singleton<TranslateDownloadManager>::get();
19 } 19 }
20 20
21 TranslateDownloadManager::TranslateDownloadManager() 21 TranslateDownloadManager::TranslateDownloadManager()
22 : language_list_(new TranslateLanguageList), 22 : language_list_(new TranslateLanguageList),
23 script_(new TranslateScript) {} 23 script_(new TranslateScript) {}
24 24
25 TranslateDownloadManager::~TranslateDownloadManager() {} 25 TranslateDownloadManager::~TranslateDownloadManager() {}
26 26
27 void TranslateDownloadManager::Shutdown() { 27 void TranslateDownloadManager::Shutdown() {
28 language_list_.reset(); 28 language_list_.reset();
(...skipping 98 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/translate/core/browser/translate_download_manager.h ('k') | components/url_formatter/url_formatter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698