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

Side by Side Diff: chrome/browser/component_updater/background_downloader_win.h

Issue 138973003: Race condition in component_updater::BackgroundDowloader (follow up) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/background_downloader_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_
7 7
8 #include "chrome/browser/component_updater/crx_downloader.h" 8 #include "chrome/browser/component_updater/crx_downloader.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 18 matching lines...) Expand all
29 scoped_refptr<base::SequencedTaskRunner> task_runner, 29 scoped_refptr<base::SequencedTaskRunner> task_runner,
30 const DownloadCallback& download_callback); 30 const DownloadCallback& download_callback);
31 virtual ~BackgroundDownloader(); 31 virtual ~BackgroundDownloader();
32 32
33 private: 33 private:
34 // Overrides for CrxDownloader. 34 // Overrides for CrxDownloader.
35 virtual void DoStartDownload(const GURL& url) OVERRIDE; 35 virtual void DoStartDownload(const GURL& url) OVERRIDE;
36 36
37 // Called asynchronously on the FILE thread at different stages during 37 // Called asynchronously on the FILE thread at different stages during
38 // the download. |OnDownloading| can be called multiple times. 38 // the download. |OnDownloading| can be called multiple times.
39 // |EndDownload| switches the execution flow from the FILE to the UI thread.
40 // Accessing any data members of this object on the FILE thread after
41 // calling |EndDownload| is unsafe.
39 void BeginDownload(const GURL& url); 42 void BeginDownload(const GURL& url);
40 void OnDownloading(); 43 void OnDownloading();
41 void EndDownload(HRESULT hr); 44 void EndDownload(HRESULT hr);
42 45
43 // Handles the job state transitions to a final state. 46 // Handles the job state transitions to a final state.
44 void OnStateTransferred(); 47 void OnStateTransferred();
45 void OnStateError(); 48 void OnStateError();
46 void OnStateCancelled(); 49 void OnStateCancelled();
47 void OnStateAcknowledged(); 50 void OnStateAcknowledged();
48 51
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 83
81 bool is_completed_; 84 bool is_completed_;
82 85
83 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader); 86 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader);
84 }; 87 };
85 88
86 } // namespace component_updater 89 } // namespace component_updater
87 90
88 #endif // CHROME_BROWSER_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ 91 #endif // CHROME_BROWSER_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_
89 92
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/background_downloader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698