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

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

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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/data_deleter.h" 5 #include "chrome/browser/extensions/data_deleter.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_special_storage_policy.h" 8 #include "chrome/browser/extensions/extension_special_storage_policy.h"
9 #include "chrome/browser/extensions/extension_util.h" 9 #include "chrome/browser/extensions/extension_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 20 matching lines...) Expand all
31 31
32 namespace extensions { 32 namespace extensions {
33 33
34 namespace { 34 namespace {
35 35
36 // Helper function that deletes data of a given |storage_origin| in a given 36 // Helper function that deletes data of a given |storage_origin| in a given
37 // |partition|. 37 // |partition|.
38 void DeleteOrigin(Profile* profile, 38 void DeleteOrigin(Profile* profile,
39 StoragePartition* partition, 39 StoragePartition* partition,
40 const GURL& origin) { 40 const GURL& origin) {
41 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 41 DCHECK_CURRENTLY_ON(BrowserThread::UI);
42 DCHECK(profile); 42 DCHECK(profile);
43 DCHECK(partition); 43 DCHECK(partition);
44 44
45 if (origin.SchemeIs(kExtensionScheme)) { 45 if (origin.SchemeIs(kExtensionScheme)) {
46 // TODO(ajwong): Cookies are not properly isolated for 46 // TODO(ajwong): Cookies are not properly isolated for
47 // chrome-extension:// scheme. (http://crbug.com/158386). 47 // chrome-extension:// scheme. (http://crbug.com/158386).
48 // 48 //
49 // However, no isolated apps actually can write to kExtensionScheme 49 // However, no isolated apps actually can write to kExtensionScheme
50 // origins. Thus, it is benign to delete from the 50 // origins. Thus, it is benign to delete from the
51 // RequestContextForExtensions because there's nothing stored there. We 51 // RequestContextForExtensions because there's nothing stored there. We
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #if defined(ENABLE_EXTENSIONS) 109 #if defined(ENABLE_EXTENSIONS)
110 // Begin removal of the settings for the current extension. 110 // Begin removal of the settings for the current extension.
111 // StorageFrontend may not exist in unit tests. 111 // StorageFrontend may not exist in unit tests.
112 StorageFrontend* frontend = StorageFrontend::Get(profile); 112 StorageFrontend* frontend = StorageFrontend::Get(profile);
113 if (frontend) 113 if (frontend)
114 frontend->DeleteStorageSoon(extension->id()); 114 frontend->DeleteStorageSoon(extension->id());
115 #endif // defined(ENABLE_EXTENSIONS) 115 #endif // defined(ENABLE_EXTENSIONS)
116 } 116 }
117 117
118 } // namespace extensions 118 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698