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

Side by Side Diff: chrome/browser/extensions/extension_updater_unittest.cc

Issue 6852029: [Sync] Move some extension-sync-related logic to ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile error Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 5 #include <map>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual void CheckForUpdatesSoon() { 130 virtual void CheckForUpdatesSoon() {
131 FAIL(); 131 FAIL();
132 } 132 }
133 133
134 virtual PendingExtensionManager* pending_extension_manager() { 134 virtual PendingExtensionManager* pending_extension_manager() {
135 ADD_FAILURE() << "Subclass should override this if it will " 135 ADD_FAILURE() << "Subclass should override this if it will "
136 << "be accessed by a test."; 136 << "be accessed by a test.";
137 return &pending_extension_manager_; 137 return &pending_extension_manager_;
138 } 138 }
139 139
140 virtual void ProcessSyncData(
141 const ExtensionSyncData& extension_sync_data,
142 PendingExtensionInfo::ShouldAllowInstallPredicate
143 should_allow_install) {
144 FAIL();
145 }
146
140 Profile* profile() { return &profile_; } 147 Profile* profile() { return &profile_; }
141 148
142 ExtensionPrefs* extension_prefs() { return prefs_.prefs(); } 149 ExtensionPrefs* extension_prefs() { return prefs_.prefs(); }
143 150
144 PrefService* pref_service() { return prefs_.pref_service(); } 151 PrefService* pref_service() { return prefs_.pref_service(); }
145 152
146 // Creates test extensions and inserts them into list. The name and 153 // Creates test extensions and inserts them into list. The name and
147 // version are all based on their index. If |update_url| is non-null, it 154 // version are all based on their index. If |update_url| is non-null, it
148 // will be used as the update_url for each extension. 155 // will be used as the update_url for each extension.
149 // The |id| is used to distinguish extension names and make sure that 156 // The |id| is used to distinguish extension names and make sure that
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1236
1230 // TODO(asargent) - (http://crbug.com/12780) add tests for: 1237 // TODO(asargent) - (http://crbug.com/12780) add tests for:
1231 // -prodversionmin (shouldn't update if browser version too old) 1238 // -prodversionmin (shouldn't update if browser version too old)
1232 // -manifests & updates arriving out of order / interleaved 1239 // -manifests & updates arriving out of order / interleaved
1233 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 1240 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
1234 // -An extension gets uninstalled while updates are in progress (so it doesn't 1241 // -An extension gets uninstalled while updates are in progress (so it doesn't
1235 // "come back from the dead") 1242 // "come back from the dead")
1236 // -An extension gets manually updated to v3 while we're downloading v2 (ie 1243 // -An extension gets manually updated to v3 while we're downloading v2 (ie
1237 // you don't get downgraded accidentally) 1244 // you don't get downgraded accidentally)
1238 // -An update manifest mentions multiple updates 1245 // -An update manifest mentions multiple updates
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698