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

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

Issue 9315007: Make the Chrome Web Store Icon Syncable (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 1577
1578 // Check the prefs. 1578 // Check the prefs.
1579 return extension_prefs_->IsIncognitoEnabled(extension_id); 1579 return extension_prefs_->IsIncognitoEnabled(extension_id);
1580 } 1580 }
1581 1581
1582 void ExtensionService::SetIsIncognitoEnabled( 1582 void ExtensionService::SetIsIncognitoEnabled(
1583 const std::string& extension_id, bool enabled) { 1583 const std::string& extension_id, bool enabled) {
1584 const Extension* extension = GetInstalledExtension(extension_id); 1584 const Extension* extension = GetInstalledExtension(extension_id);
1585 if (extension && extension->location() == Extension::COMPONENT) { 1585 if (extension && extension->location() == Extension::COMPONENT) {
1586 // This shouldn't be called for component extensions. 1586 // This shouldn't be called for component extensions.
1587 NOTREACHED();
Finnur 2012/02/01 09:18:57 Why is this needed?
csharp 2012/02/01 14:48:23 I took this out because when when the sync data fo
Finnur 2012/02/01 15:09:10 Then why not DCHECK if... extension_id != extens
csharp 2012/02/01 15:32:26 I'd wanted to avoid making too many special cases
1588 return; 1587 return;
1589 } 1588 }
1590 1589
1591 // Broadcast unloaded and loaded events to update browser state. Only bother 1590 // Broadcast unloaded and loaded events to update browser state. Only bother
1592 // if the value changed and the extension is actually enabled, since there is 1591 // if the value changed and the extension is actually enabled, since there is
1593 // no UI otherwise. 1592 // no UI otherwise.
1594 bool old_enabled = extension_prefs_->IsIncognitoEnabled(extension_id); 1593 bool old_enabled = extension_prefs_->IsIncognitoEnabled(extension_id);
1595 if (enabled == old_enabled) 1594 if (enabled == old_enabled)
1596 return; 1595 return;
1597 1596
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 // 2701 //
2703 // To coexist with certain unit tests that don't have an IO thread message 2702 // To coexist with certain unit tests that don't have an IO thread message
2704 // loop available at ExtensionService shutdown, we lazy-initialize this 2703 // loop available at ExtensionService shutdown, we lazy-initialize this
2705 // object so that those cases neither create nor destroy a SocketController. 2704 // object so that those cases neither create nor destroy a SocketController.
2706 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2705 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2707 if (!socket_controller_) { 2706 if (!socket_controller_) {
2708 socket_controller_ = new extensions::SocketController(); 2707 socket_controller_ = new extensions::SocketController();
2709 } 2708 }
2710 return socket_controller_; 2709 return socket_controller_;
2711 } 2710 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698