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

Unified Diff: chrome/browser/extensions/api/preference/preference_helpers.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/preference/preference_helpers.cc
diff --git a/chrome/browser/extensions/api/preference/preference_helpers.cc b/chrome/browser/extensions/api/preference/preference_helpers.cc
index 55297ddef7d37427fb44f6d99407a8d4e4a54733..7b18e784fc821917e01a2813f0a19b4fd0eb2e63 100644
--- a/chrome/browser/extensions/api/preference/preference_helpers.cc
+++ b/chrome/browser/extensions/api/preference/preference_helpers.cc
@@ -99,8 +99,8 @@ void DispatchEventToExtensions(
// TODO(bauerb): Only iterate over registered event listeners.
if (router->ExtensionHasEventListener(extension_id, event_name) &&
(*it)->HasAPIPermission(permission) &&
- (!incognito || IncognitoInfo::IsSplitMode(*it) ||
- extension_service->CanCrossIncognito(*it))) {
+ (!incognito || IncognitoInfo::IsSplitMode(it->get()) ||
+ extension_service->CanCrossIncognito(it->get()))) {
// Inject level of control key-value.
DictionaryValue* dict;
bool rv = args->GetDictionary(0, &dict);
@@ -115,7 +115,7 @@ void DispatchEventToExtensions(
// incognito pref has not alredy been set
Profile* restrict_to_profile = NULL;
bool from_incognito = false;
- if (IncognitoInfo::IsSplitMode(*it)) {
+ if (IncognitoInfo::IsSplitMode(it->get())) {
if (incognito && extension_service->IsIncognitoEnabled(extension_id)) {
restrict_to_profile = profile->GetOffTheRecordProfile();
} else if (!incognito &&

Powered by Google App Engine
This is Rietveld 408576698