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

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

Issue 25713007: Component updater on-demand logic with ResourceThrottle (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
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_CRX_UPDATE_ITEM_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "base/version.h" 14 #include "base/version.h"
14 #include "chrome/browser/component_updater/component_updater_service.h" 15 #include "chrome/browser/component_updater/component_updater_service.h"
15 16
17 class CUResourceThrottle;
18
16 // This is the one and only per-item state structure. Designed to be hosted 19 // This is the one and only per-item state structure. Designed to be hosted
17 // in a std::vector or a std::list. The two main members are |component| 20 // in a std::vector or a std::list. The two main members are |component|
18 // which is supplied by the the component updater client and |status| which 21 // which is supplied by the the component updater client and |status| which
19 // is modified as the item is processed by the update pipeline. The expected 22 // is modified as the item is processed by the update pipeline. The expected
20 // transition graph is: 23 // transition graph is:
21 // 24 //
22 // on-demand on-demand 25 // on-demand on-demand
23 // +---------------------------> kNew <--------------+-------------+ 26 // +---------------------------> kNew <--------------+-------------+
24 // | | | | 27 // | | | |
25 // | V | | 28 // | V | |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // the |extra_code1| usually contains a system error, but it can contain 98 // the |extra_code1| usually contains a system error, but it can contain
96 // any extended information that is relevant to either the category or the 99 // any extended information that is relevant to either the category or the
97 // error itself. 100 // error itself.
98 int error_category; 101 int error_category;
99 int error_code; 102 int error_code;
100 int extra_code1; 103 int extra_code1;
101 int diff_error_category; 104 int diff_error_category;
102 int diff_error_code; 105 int diff_error_code;
103 int diff_extra_code1; 106 int diff_extra_code1;
104 107
108 std::vector<base::WeakPtr<CUResourceThrottle>> throttles;
Sorin Jianu 2013/10/31 18:43:58 what is the opinion in the codebase relative to >>
cpu_(ooo_6.6-7.5) 2013/10/31 21:36:08 Good catch. VS can handle but did not compile on *
109
105 CrxUpdateItem(); 110 CrxUpdateItem();
106 ~CrxUpdateItem(); 111 ~CrxUpdateItem();
107 112
108 // Function object used to find a specific component. 113 // Function object used to find a specific component.
109 class FindById { 114 class FindById {
110 public: 115 public:
111 explicit FindById(const std::string& id) : id_(id) {} 116 explicit FindById(const std::string& id) : id_(id) {}
112 117
113 bool operator() (CrxUpdateItem* item) const { 118 bool operator() (CrxUpdateItem* item) const {
114 return (item->id == id_); 119 return (item->id == id_);
115 } 120 }
116 private: 121 private:
117 const std::string& id_; 122 const std::string& id_;
118 }; 123 };
119 }; 124 };
120 125
121 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_ 126 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CRX_UPDATE_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698