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

Side by Side Diff: chrome/browser/extensions/error_console/error_console.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/error_console/error_console.h" 5 #include "chrome/browser/extensions/error_console/error_console.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 CheckEnabled(); 219 CheckEnabled();
220 } 220 }
221 221
222 void ErrorConsole::OnExtensionLoaded(content::BrowserContext* browser_context, 222 void ErrorConsole::OnExtensionLoaded(content::BrowserContext* browser_context,
223 const Extension* extension) { 223 const Extension* extension) {
224 CheckEnabled(); 224 CheckEnabled();
225 } 225 }
226 226
227 void ErrorConsole::OnExtensionInstalled( 227 void ErrorConsole::OnExtensionInstalled(
228 content::BrowserContext* browser_context, 228 content::BrowserContext* browser_context,
229 const Extension* extension) { 229 const Extension* extension,
230 bool is_update) {
230 // We don't want to have manifest errors from previous installs. We want 231 // We don't want to have manifest errors from previous installs. We want
231 // to keep runtime errors, though, because extensions are reloaded on a 232 // to keep runtime errors, though, because extensions are reloaded on a
232 // refresh of chrome:extensions, and we don't want to wipe our history 233 // refresh of chrome:extensions, and we don't want to wipe our history
233 // whenever that happens. 234 // whenever that happens.
234 errors_.RemoveErrorsForExtensionOfType(extension->id(), 235 errors_.RemoveErrorsForExtensionOfType(extension->id(),
235 ExtensionError::MANIFEST_ERROR); 236 ExtensionError::MANIFEST_ERROR);
236 AddManifestErrorsForExtension(extension); 237 AddManifestErrorsForExtension(extension);
237 } 238 }
238 239
239 void ErrorConsole::OnExtensionUninstalled( 240 void ErrorConsole::OnExtensionUninstalled(
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ExtensionRegistry::Get(profile_)->GetExtensionById( 278 ExtensionRegistry::Get(profile_)->GetExtensionById(
278 extension_id, ExtensionRegistry::EVERYTHING); 279 extension_id, ExtensionRegistry::EVERYTHING);
279 if (extension && extension->location() == Manifest::UNPACKED) 280 if (extension && extension->location() == Manifest::UNPACKED)
280 return (1 << ExtensionError::NUM_ERROR_TYPES) - 1; 281 return (1 << ExtensionError::NUM_ERROR_TYPES) - 1;
281 282
282 // Otherwise, use the default mask. 283 // Otherwise, use the default mask.
283 return default_mask_; 284 return default_mask_;
284 } 285 }
285 286
286 } // namespace extensions 287 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/error_console/error_console.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698