OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_INSTALLABLE_INSTALLABLE_PROPERTY_H_ | |
6 #define CHROME_BROWSER_INSTALLABLE_INSTALLABLE_PROPERTY_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "chrome/browser/installable/installable_logging.h" | |
11 #include "content/public/common/manifest.h" | |
12 #include "third_party/skia/include/core/SkBitmap.h" | |
13 #include "url/gurl.h" | |
14 | |
15 // Resource and status structs used by the InstallableManager to internally keep | |
16 // track of what has and hasn't been fetched, as well as the errors encountered. | |
17 struct ManifestProperty { | |
benwells
2016/07/29 04:36:55
Any reason to move this into its own file? Seems l
dominickn
2016/07/31 23:32:05
I was trying to keep the size of the manager file
| |
18 ManifestProperty(); | |
benwells
2016/07/29 04:36:54
Can you just have default values for everything, i
dominickn
2016/07/31 23:32:05
Done. The destructor is forced by chromium-style.
| |
19 void Reset(); | |
benwells
2016/07/29 04:36:54
You could get rid of Reset on these by using uniqu
dominickn
2016/07/31 23:32:05
Done.
| |
20 | |
21 InstallableErrorCode error; | |
22 GURL url; | |
23 content::Manifest manifest; | |
24 bool fetched; | |
25 | |
26 private: | |
27 DISALLOW_COPY_AND_ASSIGN(ManifestProperty); | |
28 }; | |
29 | |
30 struct BooleanProperty { | |
31 BooleanProperty(); | |
32 void Reset(); | |
33 | |
34 InstallableErrorCode error; | |
35 bool value; | |
36 bool fetched; | |
37 | |
38 private: | |
39 DISALLOW_COPY_AND_ASSIGN(BooleanProperty); | |
40 }; | |
41 | |
42 struct IconProperty { | |
43 IconProperty(); | |
44 IconProperty(IconProperty&& other); | |
45 ~IconProperty(); | |
46 IconProperty& operator=(IconProperty&& other); | |
47 | |
48 InstallableErrorCode error; | |
49 GURL url; | |
50 std::unique_ptr<SkBitmap> icon; | |
51 bool fetched; | |
52 | |
53 private: | |
54 DISALLOW_COPY_AND_ASSIGN(IconProperty); | |
benwells
2016/07/29 04:36:54
Why have disallow copy and assign on this? Seems l
dominickn
2016/07/31 23:32:05
IconProperty has a std::unique_ptr, which is non-c
| |
55 }; | |
56 | |
57 #endif // CHROME_BROWSER_INSTALLABLE_INSTALLABLE_PROPERTY_H_ | |
OLD | NEW |