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

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

Issue 8785016: Add menu option for disabling app notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix merge conflicts Created 9 years 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/browser/resources/ntp4/apps_page.js » ('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) 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/apps_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698