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() != |
| 1448 extension_prefs_->IsAppNotificationDisabled(id)) { |
| 1449 extension_prefs_->SetAppNotificationDisabled( |
| 1450 id, extension_sync_data.notifications_disabled()); |
| 1451 } |
1447 } else { | 1452 } else { |
1448 // TODO(akalin): Replace silent update with a list of enabled | 1453 // TODO(akalin): Replace silent update with a list of enabled |
1449 // permissions. | 1454 // permissions. |
1450 const bool kInstallSilently = true; | 1455 const bool kInstallSilently = true; |
1451 if (!pending_extension_manager()->AddFromSync( | 1456 if (!pending_extension_manager()->AddFromSync( |
1452 id, | 1457 id, |
1453 extension_sync_data.update_url(), | 1458 extension_sync_data.update_url(), |
1454 bundle.filter, | 1459 bundle.filter, |
1455 kInstallSilently)) { | 1460 kInstallSilently)) { |
1456 LOG(WARNING) << "Could not add pending extension for " << id; | 1461 LOG(WARNING) << "Could not add pending extension for " << id; |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 | 2526 |
2522 ExtensionService::NaClModuleInfoList::iterator | 2527 ExtensionService::NaClModuleInfoList::iterator |
2523 ExtensionService::FindNaClModule(const GURL& url) { | 2528 ExtensionService::FindNaClModule(const GURL& url) { |
2524 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2529 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2525 iter != nacl_module_list_.end(); ++iter) { | 2530 iter != nacl_module_list_.end(); ++iter) { |
2526 if (iter->url == url) | 2531 if (iter->url == url) |
2527 return iter; | 2532 return iter; |
2528 } | 2533 } |
2529 return nacl_module_list_.end(); | 2534 return nacl_module_list_.end(); |
2530 } | 2535 } |
OLD | NEW |