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

Side by Side Diff: chrome/browser/extensions/updater/extension_updater.h

Issue 9718028: Allow autoupdate to update disabled extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 (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 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
11 #include <string> 11 #include <string>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "base/timer.h" 19 #include "base/timer.h"
20 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" 20 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h"
21 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" 21 #include "chrome/browser/extensions/updater/manifest_fetch_data.h"
22 #include "chrome/common/extensions/extension_set.h"
asargent_no_longer_on_chrome 2012/03/20 00:24:01 Can you just forward declare ExtensionSet and skip
Matt Tytel 2012/03/20 20:34:28 Done.
22 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
24 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
25 26
26 class ExtensionPrefs; 27 class ExtensionPrefs;
27 class ExtensionServiceInterface; 28 class ExtensionServiceInterface;
28 class PrefService; 29 class PrefService;
29 class Profile; 30 class Profile;
30 31
31 namespace extensions { 32 namespace extensions {
(...skipping 29 matching lines...) Expand all
61 void Start(); 62 void Start();
62 63
63 // Stops the updater running, cancelling any outstanding update manifest and 64 // Stops the updater running, cancelling any outstanding update manifest and
64 // crx downloads. Does not cancel any in-progress installs. 65 // crx downloads. Does not cancel any in-progress installs.
65 void Stop(); 66 void Stop();
66 67
67 // Posts a task to do an update check. Does nothing if there is 68 // Posts a task to do an update check. Does nothing if there is
68 // already a pending task that has not yet run. 69 // already a pending task that has not yet run.
69 void CheckSoon(); 70 void CheckSoon();
70 71
72 // Add fetch records for extensions that are installed and have an
73 // update URL to the downloader, ignoring |pending_ids| so the extension isn't
74 // fetched again.
75 void AddToDownloader(const ExtensionSet* extensions,
76 const std::set<std::string>& pending_ids);
asargent_no_longer_on_chrome 2012/03/20 00:24:01 Any reason not to have this be private? (Typically
Matt Tytel 2012/03/20 20:34:28 Done.
77
71 // Starts an update check right now, instead of waiting for the next 78 // Starts an update check right now, instead of waiting for the next
72 // regularly scheduled check or a pending check from CheckSoon(). 79 // regularly scheduled check or a pending check from CheckSoon().
73 void CheckNow(); 80 void CheckNow();
74 81
75 // Set blacklist checks on or off. 82 // Set blacklist checks on or off.
76 void set_blacklist_checks_enabled(bool enabled) { 83 void set_blacklist_checks_enabled(bool enabled) {
77 blacklist_checks_enabled_ = enabled; 84 blacklist_checks_enabled_ = enabled;
78 } 85 }
79 86
80 // Returns true iff CheckSoon() has been called but the update check 87 // Returns true iff CheckSoon() has been called but the update check
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 195
189 // Fetched CRX files waiting to be installed. 196 // Fetched CRX files waiting to be installed.
190 std::stack<FetchedCRXFile> fetched_crx_files_; 197 std::stack<FetchedCRXFile> fetched_crx_files_;
191 198
192 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); 199 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater);
193 }; 200 };
194 201
195 } // namespace extensions 202 } // namespace extensions
196 203
197 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ 204 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698