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

Side by Side Diff: chrome/browser/chromeos/mobile/mobile_activator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/mobile/mobile_activator.h" 5 #include "chrome/browser/chromeos/mobile/mobile_activator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 final_OTASP_attempts_(0), 175 final_OTASP_attempts_(0),
176 payment_reconnect_count_(0), 176 payment_reconnect_count_(0),
177 weak_ptr_factory_(this) { 177 weak_ptr_factory_(this) {
178 } 178 }
179 179
180 MobileActivator::~MobileActivator() { 180 MobileActivator::~MobileActivator() {
181 TerminateActivation(); 181 TerminateActivation();
182 } 182 }
183 183
184 MobileActivator* MobileActivator::GetInstance() { 184 MobileActivator* MobileActivator::GetInstance() {
185 return Singleton<MobileActivator>::get(); 185 return base::Singleton<MobileActivator>::get();
186 } 186 }
187 187
188 void MobileActivator::TerminateActivation() { 188 void MobileActivator::TerminateActivation() {
189 state_duration_timer_.Stop(); 189 state_duration_timer_.Stop();
190 continue_reconnect_timer_.Stop(); 190 continue_reconnect_timer_.Stop();
191 reconnect_timeout_timer_.Stop(); 191 reconnect_timeout_timer_.Stop();
192 192
193 if (NetworkHandler::IsInitialized()) { 193 if (NetworkHandler::IsInitialized()) {
194 NetworkHandler::Get()->network_state_handler()-> 194 NetworkHandler::Get()->network_state_handler()->
195 RemoveObserver(this, FROM_HERE); 195 RemoveObserver(this, FROM_HERE);
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 cellular_plan_payment_time_ = base::Time::Now(); 1163 cellular_plan_payment_time_ = base::Time::Now();
1164 } 1164 }
1165 1165
1166 bool MobileActivator::HasRecentCellularPlanPayment() const { 1166 bool MobileActivator::HasRecentCellularPlanPayment() const {
1167 const int kRecentPlanPaymentHours = 6; 1167 const int kRecentPlanPaymentHours = 6;
1168 return (base::Time::Now() - 1168 return (base::Time::Now() -
1169 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours; 1169 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours;
1170 } 1170 }
1171 1171
1172 } // namespace chromeos 1172 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/mobile/mobile_activator.h ('k') | chrome/browser/chromeos/mobile_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698