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

Side by Side Diff: chrome/browser/chromeos/extensions/install_limiter.h

Issue 56833003: Use base::PostTaskAndReplyWithResults() in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix clang error Created 7 years, 1 month 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/chromeos/extensions/install_limiter.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 }; 50 };
51 51
52 typedef std::queue<DeferredInstall> DeferredInstallList; 52 typedef std::queue<DeferredInstall> DeferredInstallList;
53 typedef std::set<scoped_refptr<CrxInstaller> > CrxInstallerSet; 53 typedef std::set<scoped_refptr<CrxInstaller> > CrxInstallerSet;
54 54
55 // Adds install info with size. If |size| is greater than a certain threshold, 55 // Adds install info with size. If |size| is greater than a certain threshold,
56 // it stores the install info into |deferred_installs_| to run it later. 56 // it stores the install info into |deferred_installs_| to run it later.
57 // Otherwise, it just runs the installer. 57 // Otherwise, it just runs the installer.
58 void AddWithSize(const scoped_refptr<CrxInstaller>& installer, 58 void AddWithSize(const scoped_refptr<CrxInstaller>& installer,
59 const base::FilePath& path, 59 const base::FilePath& path,
60 int64* size); 60 int64 size);
61 61
62 // Checks and runs deferred big app installs when appropriate. 62 // Checks and runs deferred big app installs when appropriate.
63 void CheckAndRunDeferrredInstalls(); 63 void CheckAndRunDeferrredInstalls();
64 64
65 // Starts install using passed-in info and observes |installer|'s done 65 // Starts install using passed-in info and observes |installer|'s done
66 // notification. 66 // notification.
67 void RunInstall(const scoped_refptr<CrxInstaller>& installer, 67 void RunInstall(const scoped_refptr<CrxInstaller>& installer,
68 const base::FilePath& path); 68 const base::FilePath& path);
69 69
70 // content::NotificationObserver overrides: 70 // content::NotificationObserver overrides:
(...skipping 10 matching lines...) Expand all
81 base::OneShotTimer<InstallLimiter> wait_timer_; 81 base::OneShotTimer<InstallLimiter> wait_timer_;
82 82
83 bool disabled_for_test_; 83 bool disabled_for_test_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(InstallLimiter); 85 DISALLOW_COPY_AND_ASSIGN(InstallLimiter);
86 }; 86 };
87 87
88 } // namespace extensions 88 } // namespace extensions
89 89
90 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/install_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698