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

Side by Side Diff: chrome/browser/extensions/extension_warning_service.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/extension_warning_service.h" 5 #include "chrome/browser/extensions/extension_warning_service.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 warnings_.insert(warnings.begin(), warnings.end()); 86 warnings_.insert(warnings.begin(), warnings.end());
87 87
88 if (old_size != warnings_.size()) 88 if (old_size != warnings_.size())
89 NotifyWarningsChanged(); 89 NotifyWarningsChanged();
90 } 90 }
91 91
92 // static 92 // static
93 void ExtensionWarningService::NotifyWarningsOnUI( 93 void ExtensionWarningService::NotifyWarningsOnUI(
94 void* profile_id, 94 void* profile_id,
95 const ExtensionWarningSet& warnings) { 95 const ExtensionWarningSet& warnings) {
96 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 96 DCHECK_CURRENTLY_ON(BrowserThread::UI);
97 Profile* profile = reinterpret_cast<Profile*>(profile_id); 97 Profile* profile = reinterpret_cast<Profile*>(profile_id);
98 if (!profile || 98 if (!profile ||
99 !g_browser_process->profile_manager() || 99 !g_browser_process->profile_manager() ||
100 !g_browser_process->profile_manager()->IsValidProfile(profile)) { 100 !g_browser_process->profile_manager()->IsValidProfile(profile)) {
101 return; 101 return;
102 } 102 }
103 103
104 extensions::ExtensionWarningService* warning_service = 104 extensions::ExtensionWarningService* warning_service =
105 extensions::ExtensionSystem::Get(profile)->warning_service(); 105 extensions::ExtensionSystem::Get(profile)->warning_service();
106 106
(...skipping 28 matching lines...) Expand all
135 ClearWarnings(warning_types); 135 ClearWarnings(warning_types);
136 break; 136 break;
137 } 137 }
138 default: 138 default:
139 NOTREACHED(); 139 NOTREACHED();
140 break; 140 break;
141 } 141 }
142 } 142 }
143 143
144 } // namespace extensions 144 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_warning_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698