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

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 8537029: Simple cleanup to avoid needing to worry about having a reference to a deleted string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('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) 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 const GURL& download_url, 269 const GURL& download_url,
270 CrxInstaller** out_crx_installer) OVERRIDE; 270 CrxInstaller** out_crx_installer) OVERRIDE;
271 271
272 // Reloads the specified extension. 272 // Reloads the specified extension.
273 void ReloadExtension(const std::string& extension_id); 273 void ReloadExtension(const std::string& extension_id);
274 274
275 // Uninstalls the specified extension. Callers should only call this method 275 // Uninstalls the specified extension. Callers should only call this method
276 // with extensions that exist. |external_uninstall| is a magical parameter 276 // with extensions that exist. |external_uninstall| is a magical parameter
277 // that is only used to send information to ExtensionPrefs, which external 277 // that is only used to send information to ExtensionPrefs, which external
278 // callers should never set to true. 278 // callers should never set to true.
279 //
280 // We pass the |extension_id| by value to avoid having it deleted from under
281 // us incase someone calls it with Extension::id() or another string that we
282 // are going to delete in this function.
283 //
279 // TODO(aa): Remove |external_uninstall| -- this information should be passed 284 // TODO(aa): Remove |external_uninstall| -- this information should be passed
280 // to ExtensionPrefs some other way. 285 // to ExtensionPrefs some other way.
281 virtual bool UninstallExtension(const std::string& extension_id, 286 virtual bool UninstallExtension(std::string extension_id,
282 bool external_uninstall, 287 bool external_uninstall,
283 std::string* error); 288 std::string* error);
284 289
285 virtual bool IsExtensionEnabled( 290 virtual bool IsExtensionEnabled(
286 const std::string& extension_id) const OVERRIDE; 291 const std::string& extension_id) const OVERRIDE;
287 virtual bool IsExternalExtensionUninstalled( 292 virtual bool IsExternalExtensionUninstalled(
288 const std::string& extension_id) const OVERRIDE; 293 const std::string& extension_id) const OVERRIDE;
289 294
290 // Enables the extension. If the extension is already enabled, does 295 // Enables the extension. If the extension is already enabled, does
291 // nothing. 296 // nothing.
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 extensions::ProcessMap process_map_; 799 extensions::ProcessMap process_map_;
795 800
796 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 801 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
797 InstallAppsWithUnlimtedStorage); 802 InstallAppsWithUnlimtedStorage);
798 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 803 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
799 InstallAppsAndCheckStorageProtection); 804 InstallAppsAndCheckStorageProtection);
800 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 805 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
801 }; 806 };
802 807
803 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 808 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698