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

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

Issue 386033002: Prune shared extendion module after extension updating. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review issues Created 6 years, 5 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
« no previous file with comments | « chrome/browser/extensions/webstore_installer.h ('k') | chrome/browser/search/hotword_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/webstore_installer.h" 5 #include "chrome/browser/extensions/webstore_installer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 break; 378 break;
379 } 379 }
380 380
381 default: 381 default:
382 NOTREACHED(); 382 NOTREACHED();
383 } 383 }
384 } 384 }
385 385
386 void WebstoreInstaller::OnExtensionInstalled( 386 void WebstoreInstaller::OnExtensionInstalled(
387 content::BrowserContext* browser_context, 387 content::BrowserContext* browser_context,
388 const Extension* extension) { 388 const Extension* extension,
389 bool is_update) {
389 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); 390 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context)));
390 if (pending_modules_.empty()) 391 if (pending_modules_.empty())
391 return; 392 return;
392 SharedModuleInfo::ImportInfo info = pending_modules_.front(); 393 SharedModuleInfo::ImportInfo info = pending_modules_.front();
393 if (extension->id() != info.extension_id) 394 if (extension->id() != info.extension_id)
394 return; 395 return;
395 pending_modules_.pop_front(); 396 pending_modules_.pop_front();
396 397
397 // Clean up local state from the current download. 398 // Clean up local state from the current download.
398 if (download_item_) { 399 if (download_item_) {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 1, 743 1,
743 kMaxSizeKb, 744 kMaxSizeKb,
744 kNumBuckets); 745 kNumBuckets);
745 } 746 }
746 UMA_HISTOGRAM_BOOLEAN( 747 UMA_HISTOGRAM_BOOLEAN(
747 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", 748 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown",
748 total_bytes <= 0); 749 total_bytes <= 0);
749 } 750 }
750 751
751 } // namespace extensions 752 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.h ('k') | chrome/browser/search/hotword_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698