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

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

Issue 16283002: Move Extension::UpdatesFromGallery to ManifestURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 } else if (extension) { 635 } else if (extension) {
636 installer->set_install_source(extension->location()); 636 installer->set_install_source(extension->location());
637 } 637 }
638 // If the extension was installed from or has migrated to the webstore, or 638 // If the extension was installed from or has migrated to the webstore, or
639 // its auto-update URL is from the webstore, treat it as a webstore install. 639 // its auto-update URL is from the webstore, treat it as a webstore install.
640 // Note that we ignore some older extensions with blank auto-update URLs 640 // Note that we ignore some older extensions with blank auto-update URLs
641 // because we are mostly concerned with restrictions on NaCl extensions, 641 // because we are mostly concerned with restrictions on NaCl extensions,
642 // which are newer. 642 // which are newer.
643 int creation_flags = Extension::NO_FLAGS; 643 int creation_flags = Extension::NO_FLAGS;
644 if ((extension && extension->from_webstore()) || 644 if ((extension && extension->from_webstore()) ||
645 (extension && extension->UpdatesFromGallery()) || 645 (extension && extensions::ManifestURL::UpdatesFromGallery(extension)) ||
646 (!extension && extension_urls::IsWebstoreUpdateUrl( 646 (!extension && extension_urls::IsWebstoreUpdateUrl(
647 pending_extension_info->update_url()))) { 647 pending_extension_info->update_url()))) {
648 creation_flags |= Extension::FROM_WEBSTORE; 648 creation_flags |= Extension::FROM_WEBSTORE;
649 } 649 }
650 650
651 // Bookmark apps being updated is kind of a contradiction, but that's because 651 // Bookmark apps being updated is kind of a contradiction, but that's because
652 // we mark the default apps as bookmark apps, and they're hosted in the web 652 // we mark the default apps as bookmark apps, and they're hosted in the web
653 // store, thus they can get updated. See http://crbug.com/101605 for more 653 // store, thus they can get updated. See http://crbug.com/101605 for more
654 // details. 654 // details.
655 if (extension && extension->from_bookmark()) 655 if (extension && extension->from_bookmark())
(...skipping 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after
2884 } 2884 }
2885 2885
2886 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 2886 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
2887 update_observers_.AddObserver(observer); 2887 update_observers_.AddObserver(observer);
2888 } 2888 }
2889 2889
2890 void ExtensionService::RemoveUpdateObserver( 2890 void ExtensionService::RemoveUpdateObserver(
2891 extensions::UpdateObserver* observer) { 2891 extensions::UpdateObserver* observer) {
2892 update_observers_.RemoveObserver(observer); 2892 update_observers_.RemoveObserver(observer);
2893 } 2893 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/external_install_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698