OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |