OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 SetIsIncognitoEnabled(id, extension_sync_data.incognito_enabled()); | 1437 SetIsIncognitoEnabled(id, extension_sync_data.incognito_enabled()); |
1438 extension = NULL; // No longer safe to use. | 1438 extension = NULL; // No longer safe to use. |
1439 | 1439 |
1440 if (extension_installed) { | 1440 if (extension_installed) { |
1441 // If the extension is already installed, check if it's outdated. | 1441 // If the extension is already installed, check if it's outdated. |
1442 if (result < 0) { | 1442 if (result < 0) { |
1443 // Extension is outdated. | 1443 // Extension is outdated. |
1444 bundle.pending_sync_data[extension_sync_data.id()] = extension_sync_data; | 1444 bundle.pending_sync_data[extension_sync_data.id()] = extension_sync_data; |
1445 CheckForUpdatesSoon(); | 1445 CheckForUpdatesSoon(); |
1446 } | 1446 } |
1447 if (extension_sync_data.notifications_disabled() != | 1447 if (extension_sync_data.type() == Extension::SYNC_TYPE_APP && |
| 1448 extension_sync_data.notifications_disabled() != |
1448 extension_prefs_->IsAppNotificationDisabled(id)) { | 1449 extension_prefs_->IsAppNotificationDisabled(id)) { |
1449 extension_prefs_->SetAppNotificationDisabled( | 1450 extension_prefs_->SetAppNotificationDisabled( |
1450 id, extension_sync_data.notifications_disabled()); | 1451 id, extension_sync_data.notifications_disabled()); |
1451 } | 1452 } |
1452 } else { | 1453 } else { |
1453 // TODO(akalin): Replace silent update with a list of enabled | 1454 // TODO(akalin): Replace silent update with a list of enabled |
1454 // permissions. | 1455 // permissions. |
1455 const bool kInstallSilently = true; | 1456 const bool kInstallSilently = true; |
1456 if (!pending_extension_manager()->AddFromSync( | 1457 if (!pending_extension_manager()->AddFromSync( |
1457 id, | 1458 id, |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2515 | 2516 |
2516 ExtensionService::NaClModuleInfoList::iterator | 2517 ExtensionService::NaClModuleInfoList::iterator |
2517 ExtensionService::FindNaClModule(const GURL& url) { | 2518 ExtensionService::FindNaClModule(const GURL& url) { |
2518 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2519 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2519 iter != nacl_module_list_.end(); ++iter) { | 2520 iter != nacl_module_list_.end(); ++iter) { |
2520 if (iter->url == url) | 2521 if (iter->url == url) |
2521 return iter; | 2522 return iter; |
2522 } | 2523 } |
2523 return nacl_module_list_.end(); | 2524 return nacl_module_list_.end(); |
2524 } | 2525 } |
OLD | NEW |