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

Side by Side Diff: chrome/browser/component_updater/test/component_updater_service_unittest.h

Issue 25909005: Use UtilityProcessHost to patch files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nonblocking
Patch Set: Rebase to 253436 Created 6 years, 9 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 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_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "chrome/browser/component_updater/component_updater_service.h" 19 #include "chrome/browser/component_updater/component_updater_service.h"
20 #include "chrome/browser/component_updater/test/component_patcher_mock.h"
21 #include "chrome/browser/component_updater/test/url_request_post_interceptor.h" 20 #include "chrome/browser/component_updater/test/url_request_post_interceptor.h"
22 #include "content/public/test/test_browser_thread_bundle.h" 21 #include "content/public/test/test_browser_thread_bundle.h"
23 #include "content/test/net/url_request_prepackaged_interceptor.h" 22 #include "content/test/net/url_request_prepackaged_interceptor.h"
24 #include "net/url_request/url_request_test_util.h" 23 #include "net/url_request/url_request_test_util.h"
25 #include "testing/gmock/include/gmock/gmock.h" 24 #include "testing/gmock/include/gmock/gmock.h"
26 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
27 26
28 namespace component_updater { 27 namespace component_updater {
29 28
30 class TestInstaller; 29 class TestInstaller;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual int StepDelay() OVERRIDE; 83 virtual int StepDelay() OVERRIDE;
85 virtual int StepDelayMedium() OVERRIDE; 84 virtual int StepDelayMedium() OVERRIDE;
86 virtual int MinimumReCheckWait() OVERRIDE; 85 virtual int MinimumReCheckWait() OVERRIDE;
87 virtual int OnDemandDelay() OVERRIDE; 86 virtual int OnDemandDelay() OVERRIDE;
88 virtual GURL UpdateUrl() OVERRIDE; 87 virtual GURL UpdateUrl() OVERRIDE;
89 virtual GURL PingUrl() OVERRIDE; 88 virtual GURL PingUrl() OVERRIDE;
90 virtual std::string ExtraRequestParams() OVERRIDE; 89 virtual std::string ExtraRequestParams() OVERRIDE;
91 virtual size_t UrlSizeLimit() OVERRIDE; 90 virtual size_t UrlSizeLimit() OVERRIDE;
92 virtual net::URLRequestContextGetter* RequestContext() OVERRIDE; 91 virtual net::URLRequestContextGetter* RequestContext() OVERRIDE;
93 virtual bool InProcess() OVERRIDE; 92 virtual bool InProcess() OVERRIDE;
94 virtual ComponentPatcher* CreateComponentPatcher() OVERRIDE;
95 virtual bool DeltasEnabled() const OVERRIDE; 93 virtual bool DeltasEnabled() const OVERRIDE;
96 virtual bool UseBackgroundDownloader() const OVERRIDE; 94 virtual bool UseBackgroundDownloader() const OVERRIDE;
97 95
98 typedef std::pair<CrxComponent*, int> CheckAtLoopCount; 96 typedef std::pair<CrxComponent*, int> CheckAtLoopCount;
99 void SetLoopCount(int times); 97 void SetLoopCount(int times);
100 void SetRecheckTime(int seconds); 98 void SetRecheckTime(int seconds);
101 void SetOnDemandTime(int seconds); 99 void SetOnDemandTime(int seconds);
102 void SetComponentUpdateService(ComponentUpdateService* cus); 100 void SetComponentUpdateService(ComponentUpdateService* cus);
103 void SetQuitClosure(const base::Closure& quit_closure); 101 void SetQuitClosure(const base::Closure& quit_closure);
104 void SetInitialDelay(int seconds); 102 void SetInitialDelay(int seconds);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 167
170 class OnDemandTester { 168 class OnDemandTester {
171 public: 169 public:
172 static ComponentUpdateService::Status OnDemand( 170 static ComponentUpdateService::Status OnDemand(
173 ComponentUpdateService* cus, const std::string& component_id); 171 ComponentUpdateService* cus, const std::string& component_id);
174 }; 172 };
175 173
176 } // namespace component_updater 174 } // namespace component_updater
177 175
178 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_ 176 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698