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

Side by Side Diff: components/update_client/test/test_configurator.h

Issue 808773005: Move most of the component updater artifacts to update_client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_TEST_TEST_CONFIGURATOR_H_
6 #define COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ 6 #define COMPONENTS_UPDATE_CLIENT_TEST_TEST_CONFIGURATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "components/component_updater/component_updater_configurator.h" 16 #include "components/update_client/configurator.h"
17 #include "net/url_request/url_request_test_util.h" 17 #include "net/url_request/url_request_test_util.h"
18 18
19 class GURL; 19 class GURL;
20 20
21 namespace base { 21 namespace base {
22 class SequencedTaskRunner; 22 class SequencedTaskRunner;
23 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
24 } // namespace base 24 } // namespace base
25 25
26 namespace component_updater { 26 namespace update_client {
27 27
28 #define POST_INTERCEPT_SCHEME "https" 28 #define POST_INTERCEPT_SCHEME "https"
29 #define POST_INTERCEPT_HOSTNAME "localhost2" 29 #define POST_INTERCEPT_HOSTNAME "localhost2"
30 #define POST_INTERCEPT_PATH "/update2" 30 #define POST_INTERCEPT_PATH "/update2"
31 31
32 struct CrxComponent; 32 struct CrxComponent;
33 33
34 // component 1 has extension id "jebgalgnebhfojomionfpkfelancnnkf", and
35 // the RSA public key the following hash:
36 const uint8_t jebg_hash[] = {0x94, 0x16, 0x0b, 0x6d, 0x41, 0x75, 0xe9, 0xec,
37 0x8e, 0xd5, 0xfa, 0x54, 0xb0, 0xd2, 0xdd, 0xa5,
38 0x6e, 0x05, 0x6b, 0xe8, 0x73, 0x47, 0xf6, 0xc4,
39 0x11, 0x9f, 0xbc, 0xb3, 0x09, 0xb3, 0x5b, 0x40};
40 // component 2 has extension id "abagagagagagagagagagagagagagagag", and
41 // the RSA public key the following hash:
42 const uint8_t abag_hash[] = {0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
43 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
44 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
45 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01};
46 // component 3 has extension id "ihfokbkgjpifnbbojhneepfflplebdkc", and
47 // the RSA public key the following hash:
48 const uint8_t ihfo_hash[] = {0x87, 0x5e, 0xa1, 0xa6, 0x9f, 0x85, 0xd1, 0x1e,
49 0x97, 0xd4, 0x4f, 0x55, 0xbf, 0xb4, 0x13, 0xa2,
50 0xe7, 0xc5, 0xc8, 0xf5, 0x60, 0x19, 0x78, 0x1b,
51 0x6d, 0xe9, 0x4c, 0xeb, 0x96, 0x05, 0x42, 0x17};
52
34 class TestConfigurator : public Configurator { 53 class TestConfigurator : public Configurator {
35 public: 54 public:
36 TestConfigurator( 55 TestConfigurator(
37 const scoped_refptr<base::SequencedTaskRunner>& worker_task_runner, 56 const scoped_refptr<base::SequencedTaskRunner>& worker_task_runner,
38 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner); 57 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner);
39 ~TestConfigurator() override; 58 ~TestConfigurator() override;
40 59
41 // Overrrides for Configurator. 60 // Overrrides for Configurator.
42 int InitialDelay() const override; 61 int InitialDelay() const override;
43 int NextCheckDelay() override; 62 int NextCheckDelay() override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 int times_; 95 int times_;
77 int recheck_time_; 96 int recheck_time_;
78 int ondemand_time_; 97 int ondemand_time_;
79 98
80 scoped_refptr<net::TestURLRequestContextGetter> context_; 99 scoped_refptr<net::TestURLRequestContextGetter> context_;
81 base::Closure quit_closure_; 100 base::Closure quit_closure_;
82 101
83 DISALLOW_COPY_AND_ASSIGN(TestConfigurator); 102 DISALLOW_COPY_AND_ASSIGN(TestConfigurator);
84 }; 103 };
85 104
86 } // namespace component_updater 105 } // namespace update_client
87 106
88 #endif // COMPONENTS_COMPONENT_UPDATER_TEST_TEST_CONFIGURATOR_H_ 107 #endif // COMPONENTS_UPDATE_CLIENT_TEST_TEST_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698