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

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: 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
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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
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());
Finnur 2011/12/05 16:15:16 Wait... Isn't one possibility here that app notifi
asargent_no_longer_on_chrome 2011/12/05 17:42:39 |extension_sync_data| is specific to a particular
1447 } else { 1451 } else {
1448 // TODO(akalin): Replace silent update with a list of enabled 1452 // TODO(akalin): Replace silent update with a list of enabled
1449 // permissions. 1453 // permissions.
1450 const bool kInstallSilently = true; 1454 const bool kInstallSilently = true;
1451 if (!pending_extension_manager()->AddFromSync( 1455 if (!pending_extension_manager()->AddFromSync(
1452 id, 1456 id,
1453 extension_sync_data.update_url(), 1457 extension_sync_data.update_url(),
1454 bundle.filter, 1458 bundle.filter,
1455 kInstallSilently)) { 1459 kInstallSilently)) {
1456 LOG(WARNING) << "Could not add pending extension for " << id; 1460 LOG(WARNING) << "Could not add pending extension for " << id;
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 2525
2522 ExtensionService::NaClModuleInfoList::iterator 2526 ExtensionService::NaClModuleInfoList::iterator
2523 ExtensionService::FindNaClModule(const GURL& url) { 2527 ExtensionService::FindNaClModule(const GURL& url) {
2524 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2528 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2525 iter != nacl_module_list_.end(); ++iter) { 2529 iter != nacl_module_list_.end(); ++iter) {
2526 if (iter->url == url) 2530 if (iter->url == url)
2527 return iter; 2531 return iter;
2528 } 2532 }
2529 return nacl_module_list_.end(); 2533 return nacl_module_list_.end();
2530 } 2534 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698