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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 SetIsIncognitoEnabled(id, extension_sync_data.incognito_enabled()); | 1435 SetIsIncognitoEnabled(id, extension_sync_data.incognito_enabled()); |
1436 extension = NULL; // No longer safe to use. | 1436 extension = NULL; // No longer safe to use. |
1437 | 1437 |
1438 if (extension_installed) { | 1438 if (extension_installed) { |
1439 // If the extension is already installed, check if it's outdated. | 1439 // If the extension is already installed, check if it's outdated. |
1440 if (result < 0) { | 1440 if (result < 0) { |
1441 // Extension is outdated. | 1441 // Extension is outdated. |
1442 bundle.pending_sync_data[extension_sync_data.id()] = extension_sync_data; | 1442 bundle.pending_sync_data[extension_sync_data.id()] = extension_sync_data; |
1443 CheckForUpdatesSoon(); | 1443 CheckForUpdatesSoon(); |
1444 } | 1444 } |
| 1445 if (extension_sync_data.notifications_disabled() != |
| 1446 extension_prefs_->IsAppNotificationDisabled(id)) { |
| 1447 extension_prefs_->SetAppNotificationDisabled( |
| 1448 id, extension_sync_data.notifications_disabled()); |
| 1449 } |
1445 } else { | 1450 } else { |
1446 // TODO(akalin): Replace silent update with a list of enabled | 1451 // TODO(akalin): Replace silent update with a list of enabled |
1447 // permissions. | 1452 // permissions. |
1448 const bool kInstallSilently = true; | 1453 const bool kInstallSilently = true; |
1449 if (!pending_extension_manager()->AddFromSync( | 1454 if (!pending_extension_manager()->AddFromSync( |
1450 id, | 1455 id, |
1451 extension_sync_data.update_url(), | 1456 extension_sync_data.update_url(), |
1452 bundle.filter, | 1457 bundle.filter, |
1453 kInstallSilently)) { | 1458 kInstallSilently)) { |
1454 LOG(WARNING) << "Could not add pending extension for " << id; | 1459 LOG(WARNING) << "Could not add pending extension for " << id; |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2519 | 2524 |
2520 ExtensionService::NaClModuleInfoList::iterator | 2525 ExtensionService::NaClModuleInfoList::iterator |
2521 ExtensionService::FindNaClModule(const GURL& url) { | 2526 ExtensionService::FindNaClModule(const GURL& url) { |
2522 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2527 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2523 iter != nacl_module_list_.end(); ++iter) { | 2528 iter != nacl_module_list_.end(); ++iter) { |
2524 if (iter->url == url) | 2529 if (iter->url == url) |
2525 return iter; | 2530 return iter; |
2526 } | 2531 } |
2527 return nacl_module_list_.end(); | 2532 return nacl_module_list_.end(); |
2528 } | 2533 } |
OLD | NEW |