12
12
#include < vector>
13
13
#include < mutex>
14
14
15
+ #include " base/files/file_path.h"
15
16
#include " brave/components/brave_shields/browser/base_brave_shields_service.h"
16
17
#include " content/public/common/resource_type.h"
17
18
18
19
class AdBlockClient ;
19
20
class AdBlockServiceTest ;
20
21
22
+ const uint8_t kAdBlockPlusUpdaterPublicKey [294 ] = {
23
+ 0x30 , 0x82 , 0x01 , 0x22 , 0x30 , 0x0d , 0x06 , 0x09 ,
24
+ 0x2a , 0x86 , 0x48 , 0x86 , 0xf7 , 0x0d , 0x01 , 0x01 ,
25
+ 0x01 , 0x05 , 0x00 , 0x03 , 0x82 , 0x01 , 0x0f , 0x00 ,
26
+ 0x30 , 0x82 , 0x01 , 0x0a , 0x02 , 0x82 , 0x01 , 0x01 ,
27
+ 0x00 , 0xb3 , 0x4a , 0xb3 , 0x26 , 0x61 , 0xd2 , 0x80 ,
28
+ 0x88 , 0xb0 , 0xec , 0x81 , 0x85 , 0x0b , 0x18 , 0xa3 ,
29
+ 0xd4 , 0xd9 , 0xc1 , 0xe6 , 0x12 , 0x79 , 0x65 , 0x0d ,
30
+ 0x4b , 0x29 , 0x6f , 0x61 , 0xb4 , 0xbe , 0x04 , 0x04 ,
31
+ 0xe6 , 0x8c , 0x26 , 0xf9 , 0xaa , 0x68 , 0x3b , 0x3f ,
32
+ 0xc1 , 0xfa , 0xb4 , 0x9f , 0x0f , 0xe0 , 0xa0 , 0x11 ,
33
+ 0xd6 , 0xb2 , 0xaa , 0xa4 , 0x30 , 0x1c , 0xa7 , 0x45 ,
34
+ 0x3b , 0xb6 , 0x1f , 0x1c , 0x62 , 0xae , 0xf7 , 0x5b ,
35
+ 0x72 , 0xe8 , 0x27 , 0xd4 , 0x6a , 0x32 , 0xb3 , 0x94 ,
36
+ 0x0a , 0x3e , 0x00 , 0x2f , 0x2b , 0x00 , 0xc7 , 0x26 ,
37
+ 0x9f , 0x63 , 0x96 , 0x70 , 0x03 , 0x5a , 0x6e , 0x71 ,
38
+ 0x42 , 0xf3 , 0xd0 , 0xe0 , 0x61 , 0x35 , 0x98 , 0xad ,
39
+ 0x7f , 0x23 , 0x79 , 0x1a , 0xf5 , 0xc1 , 0x0e , 0x0b ,
40
+ 0x33 , 0xd6 , 0xe8 , 0x62 , 0x3e , 0xc0 , 0x62 , 0xe2 ,
41
+ 0x54 , 0xfc , 0x7d , 0x55 , 0x9a , 0xf1 , 0x1c , 0x7b ,
42
+ 0x12 , 0x04 , 0x82 , 0x51 , 0x68 , 0x40 , 0x79 , 0x4f ,
43
+ 0x28 , 0xb9 , 0x6e , 0x3d , 0x02 , 0x67 , 0xe9 , 0x1c ,
44
+ 0x7c , 0xc9 , 0xd1 , 0x4e , 0xc5 , 0xc8 , 0x07 , 0x0d ,
45
+ 0xc2 , 0xeb , 0x12 , 0x60 , 0x09 , 0x52 , 0x88 , 0x49 ,
46
+ 0x05 , 0x24 , 0x77 , 0xc9 , 0x9a , 0xc1 , 0x5b , 0xc6 ,
47
+ 0xbe , 0xa3 , 0xa1 , 0x04 , 0xea , 0x20 , 0x09 , 0xd6 ,
48
+ 0xfd , 0xab , 0x36 , 0xb9 , 0x78 , 0x9d , 0x42 , 0x83 ,
49
+ 0x1f , 0x11 , 0x58 , 0xab , 0x9c , 0x15 , 0xf6 , 0x96 ,
50
+ 0x5b , 0x12 , 0x8b , 0x39 , 0xe9 , 0x42 , 0x88 , 0x13 ,
51
+ 0x13 , 0xd4 , 0x79 , 0xb5 , 0xce , 0x70 , 0x28 , 0x54 ,
52
+ 0x11 , 0xc6 , 0xfd , 0xb9 , 0x61 , 0x24 , 0x93 , 0x83 ,
53
+ 0xe4 , 0x77 , 0x07 , 0xfe , 0x17 , 0x91 , 0xac , 0x1e ,
54
+ 0x0c , 0xbe , 0xb1 , 0x35 , 0x27 , 0xbe , 0x96 , 0x17 ,
55
+ 0x77 , 0xef , 0x67 , 0x4d , 0xda , 0x1d , 0x57 , 0x27 ,
56
+ 0x94 , 0xbb , 0x50 , 0x7a , 0x23 , 0x4d , 0x39 , 0x9e ,
57
+ 0xd5 , 0x6c , 0x10 , 0xd7 , 0x76 , 0x27 , 0xbc , 0x36 ,
58
+ 0x89 , 0x9f , 0xfd , 0x0b , 0x30 , 0x6c , 0x11 , 0x9a ,
59
+ 0x57 , 0x02 , 0x03 , 0x01 , 0x00 , 0x01
60
+ };
61
+
62
+ const std::string kAdBlockPlusUpdaterPublicKeyStr (
63
+ (const char *)kAdBlockPlusUpdaterPublicKey, sizeof(kAdBlockPlusUpdaterPublicKey ));
64
+ const std::string kAdBlockPlusUpdaterId (" cffkpbalmllkdoenhmdmpbkajipdjfam" );
65
+ const std::string kAdBlockPlusUpdaterName (" AdBlock Plus Updater" );
66
+
21
67
namespace brave_shields {
22
68
23
69
// The brave shields service in charge of ad-block checking and init.
@@ -35,6 +81,11 @@ class AdBlockService : public BaseBraveShieldsService {
35
81
void Cleanup () override ;
36
82
37
83
private:
84
+ void OnComponentRegistered (const std::string& extension_id);
85
+ void OnComponentReady (
86
+ const std::string& extension_id,
87
+ const base::FilePath& install_dir);
88
+
38
89
friend class ::AdBlockServiceTest;
39
90
static GURL g_ad_block_url;
40
91
static void SetAdBlockURLForTest (const GURL& url);
0 commit comments