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

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

Issue 105853002: Implement a background downloader using BITS in Windows Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed error codes. Created 7 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/component_updater/test/component_updater_service_unitte st.h" 5 #include "chrome/browser/component_updater/test/component_updater_service_unitte st.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool TestConfigurator::InProcess() { return true; } 103 bool TestConfigurator::InProcess() { return true; }
104 104
105 ComponentPatcher* TestConfigurator::CreateComponentPatcher() { 105 ComponentPatcher* TestConfigurator::CreateComponentPatcher() {
106 return new MockComponentPatcher(); 106 return new MockComponentPatcher();
107 } 107 }
108 108
109 bool TestConfigurator::DeltasEnabled() const { 109 bool TestConfigurator::DeltasEnabled() const {
110 return true; 110 return true;
111 } 111 }
112 112
113 bool TestConfigurator::UseBackgroundDownloader() const {
114 return false;
115 }
116
113 // Set how many update checks are called, the default value is just once. 117 // Set how many update checks are called, the default value is just once.
114 void TestConfigurator::SetLoopCount(int times) { times_ = times; } 118 void TestConfigurator::SetLoopCount(int times) { times_ = times; }
115 119
116 void TestConfigurator::SetRecheckTime(int seconds) { 120 void TestConfigurator::SetRecheckTime(int seconds) {
117 recheck_time_ = seconds; 121 recheck_time_ = seconds;
118 } 122 }
119 123
120 void TestConfigurator::SetOnDemandTime(int seconds) { 124 void TestConfigurator::SetOnDemandTime(int seconds) {
121 ondemand_time_ = seconds; 125 ondemand_time_ = seconds;
122 } 126 }
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 1277
1274 EXPECT_EQ(1, post_interceptor_->GetHitCount()); 1278 EXPECT_EQ(1, post_interceptor_->GetHitCount());
1275 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error()); 1279 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error());
1276 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->install_count()); 1280 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->install_count());
1277 1281
1278 component_updater()->Stop(); 1282 component_updater()->Stop();
1279 } 1283 }
1280 1284
1281 } // namespace component_updater 1285 } // namespace component_updater
1282 1286
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698