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

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

Issue 10378117: With enable-action-box add extensions to BrowserActionContainer only if they have preference kBrows… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 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_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 if (allow == old_allow) 1688 if (allow == old_allow)
1689 return; 1689 return;
1690 1690
1691 extension_prefs_->SetAllowFileAccess(extension->id(), allow); 1691 extension_prefs_->SetAllowFileAccess(extension->id(), allow);
1692 1692
1693 bool extension_is_enabled = extensions_.Contains(extension->id()); 1693 bool extension_is_enabled = extensions_.Contains(extension->id());
1694 if (extension_is_enabled) 1694 if (extension_is_enabled)
1695 ReloadExtension(extension->id()); 1695 ReloadExtension(extension->id());
1696 } 1696 }
1697 1697
1698 bool ExtensionService::GetBrowserActionVisibility(const Extension* extension) {
1699 return extension_prefs_->GetBrowserActionVisibility(extension);
1700 }
1701
1702 void ExtensionService::SetBrowserActionVisibility(const Extension* extension,
1703 bool visible) {
1704 extension_prefs_->SetBrowserActionVisibility(extension, visible);
1705 }
1706
1707 // Some extensions will autoupdate themselves externally from Chrome. These 1698 // Some extensions will autoupdate themselves externally from Chrome. These
1708 // are typically part of some larger client application package. To support 1699 // are typically part of some larger client application package. To support
1709 // these, the extension will register its location in the the preferences file 1700 // these, the extension will register its location in the the preferences file
1710 // (and also, on Windows, in the registry) and this code will periodically 1701 // (and also, on Windows, in the registry) and this code will periodically
1711 // check that location for a .crx file, which it will then install locally if 1702 // check that location for a .crx file, which it will then install locally if
1712 // a new version is available. 1703 // a new version is available.
1713 // Errors are reported through ExtensionErrorReporter. Succcess is not 1704 // Errors are reported through ExtensionErrorReporter. Succcess is not
1714 // reported. 1705 // reported.
1715 void ExtensionService::CheckForExternalUpdates() { 1706 void ExtensionService::CheckForExternalUpdates() {
1716 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1707 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2643 // To coexist with certain unit tests that don't have an IO thread message 2634 // To coexist with certain unit tests that don't have an IO thread message
2644 // loop available at ExtensionService shutdown, we lazy-initialize this 2635 // loop available at ExtensionService shutdown, we lazy-initialize this
2645 // object so that those cases neither create nor destroy an 2636 // object so that those cases neither create nor destroy an
2646 // APIResourceController. 2637 // APIResourceController.
2647 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2638 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2648 if (!api_resource_controller_) { 2639 if (!api_resource_controller_) {
2649 api_resource_controller_ = new extensions::APIResourceController(); 2640 api_resource_controller_ = new extensions::APIResourceController();
2650 } 2641 }
2651 return api_resource_controller_; 2642 return api_resource_controller_;
2652 } 2643 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698