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

Side by Side Diff: components/component_updater/crx_downloader.cc

Issue 449643002: Componentize component_updater: Move over a bunch of files to the component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add more checked casts Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/component_updater/crx_downloader.h" 5 #include "components/component_updater/crx_downloader.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sequenced_task_runner.h" 8 #include "base/sequenced_task_runner.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "chrome/browser/component_updater/url_fetcher_downloader.h" 10 #include "components/component_updater/url_fetcher_downloader.h"
11 11
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 #include "chrome/browser/component_updater/background_downloader_win.h" 13 #include "components/component_updater/background_downloader_win.h"
14 #endif 14 #endif
15 15
16 namespace component_updater { 16 namespace component_updater {
17 17
18 CrxDownloader::Result::Result() 18 CrxDownloader::Result::Result()
19 : error(0), downloaded_bytes(-1), total_bytes(-1) { 19 : error(0), downloaded_bytes(-1), total_bytes(-1) {
20 } 20 }
21 21
22 CrxDownloader::DownloadMetrics::DownloadMetrics() 22 CrxDownloader::DownloadMetrics::DownloadMetrics()
23 : downloader(kNone), 23 : downloader(kNone),
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void CrxDownloader::OnDownloadProgress(const Result& result) { 149 void CrxDownloader::OnDownloadProgress(const Result& result) {
150 DCHECK(thread_checker_.CalledOnValidThread()); 150 DCHECK(thread_checker_.CalledOnValidThread());
151 151
152 if (progress_callback_.is_null()) 152 if (progress_callback_.is_null())
153 return; 153 return;
154 154
155 progress_callback_.Run(result); 155 progress_callback_.Run(result);
156 } 156 }
157 157
158 } // namespace component_updater 158 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698