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

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

Issue 331743004: Always enable enhanced bookmarks external component extensions for incognito mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: rebase Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 1977
1978 bool unacknowledged_external = IsUnacknowledgedExternalExtension(extension); 1978 bool unacknowledged_external = IsUnacknowledgedExternalExtension(extension);
1979 1979
1980 // Unpacked extensions default to allowing file access, but if that has been 1980 // Unpacked extensions default to allowing file access, but if that has been
1981 // overridden, don't reset the value. 1981 // overridden, don't reset the value.
1982 if (Manifest::ShouldAlwaysAllowFileAccess(extension->location()) && 1982 if (Manifest::ShouldAlwaysAllowFileAccess(extension->location()) &&
1983 !extension_prefs_->HasAllowFileAccessSetting(extension->id())) { 1983 !extension_prefs_->HasAllowFileAccessSetting(extension->id())) {
1984 extension_prefs_->SetAllowFileAccess(extension->id(), true); 1984 extension_prefs_->SetAllowFileAccess(extension->id(), true);
1985 } 1985 }
1986 1986
1987 if (extensions::util::EnableIncognitoByDefault(extension))
1988 extension_prefs_->SetIsIncognitoEnabled(extension->id(), true);
not at google - send to devlin 2014/06/18 23:49:19 i don't think you need this code anymore
Mike Wittman 2014/06/19 00:21:49 Done.
1989
1987 AddExtension(extension); 1990 AddExtension(extension);
1988 1991
1989 // Notify observers that need to know when an installation is complete. 1992 // Notify observers that need to know when an installation is complete.
1990 registry_->TriggerOnInstalled(extension); 1993 registry_->TriggerOnInstalled(extension);
1991 1994
1992 // If this is a new external extension that was disabled, alert the user 1995 // If this is a new external extension that was disabled, alert the user
1993 // so he can reenable it. We do this last so that it has already been 1996 // so he can reenable it. We do this last so that it has already been
1994 // added to our list of extensions. 1997 // added to our list of extensions.
1995 if (unacknowledged_external && !is_update) { 1998 if (unacknowledged_external && !is_update) {
1996 UpdateExternalExtensionAlert(); 1999 UpdateExternalExtensionAlert();
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 } 2551 }
2549 2552
2550 void ExtensionService::OnProfileDestructionStarted() { 2553 void ExtensionService::OnProfileDestructionStarted() {
2551 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2554 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2552 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2555 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2553 it != ids_to_unload.end(); 2556 it != ids_to_unload.end();
2554 ++it) { 2557 ++it) {
2555 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2558 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2556 } 2559 }
2557 } 2560 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_util.h » ('j') | chrome/browser/extensions/extension_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698