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

Unified Diff: chrome/browser/extensions/extension_updater.cc

Issue 4732005: [Sync] Added some basic extension sync integration tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed whitespace Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/test/live_sync/live_extensions_sync_test.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_updater.cc
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index b2b3972451c4816fcfe85a7f7c91797461c2aeaa..654d6dc8c385eb7e70283b35782fcef1e70fad8d 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -417,6 +417,7 @@ void ExtensionUpdater::Start() {
}
void ExtensionUpdater::Stop() {
+ service_ = NULL;
timer_.Stop();
manifest_fetcher_.reset();
extension_fetcher_.reset();
@@ -428,6 +429,10 @@ void ExtensionUpdater::OnURLFetchComplete(
const URLFetcher* source, const GURL& url, const URLRequestStatus& status,
int response_code, const ResponseCookies& cookies,
const std::string& data) {
+ // This can be called after we've been stopped.
+ if (!service_)
+ return;
+
if (source == manifest_fetcher_.get()) {
OnManifestFetchComplete(url, status, response_code, data);
} else if (source == extension_fetcher_.get()) {
@@ -540,6 +545,9 @@ void ExtensionUpdater::OnManifestFetchComplete(const GURL& url,
void ExtensionUpdater::HandleManifestResults(
const ManifestFetchData& fetch_data,
const UpdateManifest::Results& results) {
+ // This can be called after we've been stopped.
+ if (!service_)
+ return;
// Examine the parsed manifest and kick off fetches of any new crx files.
std::vector<int> updates = DetermineUpdates(fetch_data, results);
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/test/live_sync/live_extensions_sync_test.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698