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

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

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 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 | 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/component_updater_service.h" 5 #include "chrome/browser/component_updater/component_updater_service.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Set how many update checks are called, the default value is just once. 76 // Set how many update checks are called, the default value is just once.
77 void SetLoopCount(int times) { times_ = times; } 77 void SetLoopCount(int times) { times_ = times; }
78 78
79 private: 79 private:
80 int times_; 80 int times_;
81 }; 81 };
82 82
83 class TestInstaller : public ComponentInstaller { 83 class TestInstaller : public ComponentInstaller {
84 public : 84 public :
85 explicit TestInstaller() 85 TestInstaller()
86 : error_(0), install_count_(0) { 86 : error_(0), install_count_(0) {
87 } 87 }
88 88
89 virtual void OnUpdateError(int error) OVERRIDE { 89 virtual void OnUpdateError(int error) OVERRIDE {
90 EXPECT_NE(0, error); 90 EXPECT_NE(0, error);
91 error_ = error; 91 error_ = error;
92 } 92 }
93 93
94 virtual bool Install(base::DictionaryValue* manifest, 94 virtual bool Install(base::DictionaryValue* manifest,
95 const FilePath& unpack_path) OVERRIDE { 95 const FilePath& unpack_path) OVERRIDE {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 test_configurator()->SetLoopCount(1); 397 test_configurator()->SetLoopCount(1);
398 component_updater()->Start(); 398 component_updater()->Start();
399 message_loop.Run(); 399 message_loop.Run();
400 400
401 EXPECT_EQ(1, interceptor.GetHitCount()); 401 EXPECT_EQ(1, interceptor.GetHitCount());
402 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error()); 402 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error());
403 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->install_count()); 403 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->install_count());
404 404
405 component_updater()->Stop(); 405 component_updater()->Stop();
406 } 406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698