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

Side by Side Diff: chrome/browser/chromeos/login/login_location_monitor.cc

Issue 208273005: If customization includes default wallpaper, download and apply it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after-review. Created 6 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 "chrome/browser/chromeos/login/login_location_monitor.h" 5 #include "chrome/browser/chromeos/login/login_location_monitor.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h" 10 #include "chrome/browser/chromeos/login/wizard_controller.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 << GeopositionToStringForDebug(position) << "}"; 111 << GeopositionToStringForDebug(position) << "}";
112 112
113 content::BrowserThread::PostTask( 113 content::BrowserThread::PostTask(
114 content::BrowserThread::UI, 114 content::BrowserThread::UI,
115 FROM_HERE, 115 FROM_HERE,
116 base::Bind(&LoginLocationMonitor::OnLocationUpdatedUI, position)); 116 base::Bind(&LoginLocationMonitor::OnLocationUpdatedUI, position));
117 } 117 }
118 118
119 void LoginLocationMonitor::OnLocationUpdatedUI( 119 void LoginLocationMonitor::OnLocationUpdatedUI(
120 const content::Geoposition& position) { 120 const content::Geoposition& position) {
121 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 121 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
122 DCHECK(position.Validate()); 122 DCHECK(position.Validate());
123 123
124 LoginLocationMonitor* self = GetInstance(); 124 LoginLocationMonitor* self = GetInstance();
125 125
126 if (!self->request_timeout_.IsRunning()) { 126 if (!self->request_timeout_.IsRunning()) {
127 VLOG(1) 127 VLOG(1)
128 << "LoginLocationMonitor::OnLocationUpdatedUI(): Service is stopped: {" 128 << "LoginLocationMonitor::OnLocationUpdatedUI(): Service is stopped: {"
129 << GeopositionToStringForDebug(position) << "}"; 129 << GeopositionToStringForDebug(position) << "}";
130 return; 130 return;
131 } 131 }
132 132
133 RemoveLocationCallback(); 133 RemoveLocationCallback();
134 134
135 // We need a cumulative timeout for timezone resolve, that is 135 // We need a cumulative timeout for timezone resolve, that is
136 // (location resolve + timezone resolve). This is used to measure 136 // (location resolve + timezone resolve). This is used to measure
137 // timeout for the following timezone resolve. 137 // timeout for the following timezone resolve.
138 const base::TimeDelta elapsed = base::Time::Now() - self->started_; 138 const base::TimeDelta elapsed = base::Time::Now() - self->started_;
139 139
140 WizardController::OnLocationUpdated(position, elapsed); 140 WizardController::OnLocationUpdated(position, elapsed);
141 } 141 }
142 142
143 } // namespace chromeos 143 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_private_api.cc ('k') | chrome/browser/chromeos/login/wallpaper_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698