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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller 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/ui/webui/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 void OnDownloadTimeout() { 199 void OnDownloadTimeout() {
200 eula_fetcher_.reset(); 200 eula_fetcher_.reset();
201 fetch_callback_.Run(this); 201 fetch_callback_.Run(this);
202 delete this; 202 delete this;
203 } 203 }
204 204
205 // Timer that enforces a timeout on the attempt to download the 205 // Timer that enforces a timeout on the attempt to download the
206 // ChromeOS Terms. 206 // ChromeOS Terms.
207 base::OneShotTimer<ChromeOSOnlineTermsHandler> download_timer_; 207 base::OneShotTimer download_timer_;
208 208
209 // |fetch_callback_| called when fetching succeeded or failed. 209 // |fetch_callback_| called when fetching succeeded or failed.
210 FetchCallback fetch_callback_; 210 FetchCallback fetch_callback_;
211 211
212 // Helper to fetch online eula. 212 // Helper to fetch online eula.
213 scoped_ptr<net::URLFetcher> eula_fetcher_; 213 scoped_ptr<net::URLFetcher> eula_fetcher_;
214 214
215 DISALLOW_COPY_AND_ASSIGN(ChromeOSOnlineTermsHandler); 215 DISALLOW_COPY_AND_ASSIGN(ChromeOSOnlineTermsHandler);
216 }; 216 };
217 217
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 Profile* profile = Profile::FromWebUI(web_ui); 1030 Profile* profile = Profile::FromWebUI(web_ui);
1031 1031
1032 #if defined(ENABLE_THEMES) 1032 #if defined(ENABLE_THEMES)
1033 // Set up the chrome://theme/ source. 1033 // Set up the chrome://theme/ source.
1034 ThemeSource* theme = new ThemeSource(profile); 1034 ThemeSource* theme = new ThemeSource(profile);
1035 content::URLDataSource::Add(profile, theme); 1035 content::URLDataSource::Add(profile, theme);
1036 #endif 1036 #endif
1037 1037
1038 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1038 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1039 } 1039 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/reload_button.h ('k') | chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698