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

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

Issue 10855190: Disable sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 creation_flags |= Extension::FROM_WEBSTORE; 618 creation_flags |= Extension::FROM_WEBSTORE;
619 } 619 }
620 620
621 // Bookmark apps being updated is kind of a contradiction, but that's because 621 // Bookmark apps being updated is kind of a contradiction, but that's because
622 // we mark the default apps as bookmark apps, and they're hosted in the web 622 // we mark the default apps as bookmark apps, and they're hosted in the web
623 // store, thus they can get updated. See http://crbug.com/101605 for more 623 // store, thus they can get updated. See http://crbug.com/101605 for more
624 // details. 624 // details.
625 if (extension && extension->from_bookmark()) 625 if (extension && extension->from_bookmark())
626 creation_flags |= Extension::FROM_BOOKMARK; 626 creation_flags |= Extension::FROM_BOOKMARK;
627 627
628 if (extension && extension->was_installed_by_default())
629 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT;
630
628 installer->set_creation_flags(creation_flags); 631 installer->set_creation_flags(creation_flags);
629 632
630 installer->set_delete_source(true); 633 installer->set_delete_source(true);
631 installer->set_download_url(download_url); 634 installer->set_download_url(download_url);
632 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); 635 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE);
633 installer->InstallCrx(extension_path); 636 installer->InstallCrx(extension_path);
634 637
635 if (out_crx_installer) 638 if (out_crx_installer)
636 *out_crx_installer = installer; 639 *out_crx_installer = installer;
637 640
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 2572
2570 ExtensionService::NaClModuleInfoList::iterator 2573 ExtensionService::NaClModuleInfoList::iterator
2571 ExtensionService::FindNaClModule(const GURL& url) { 2574 ExtensionService::FindNaClModule(const GURL& url) {
2572 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2575 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2573 iter != nacl_module_list_.end(); ++iter) { 2576 iter != nacl_module_list_.end(); ++iter) {
2574 if (iter->url == url) 2577 if (iter->url == url)
2575 return iter; 2578 return iter;
2576 } 2579 }
2577 return nacl_module_list_.end(); 2580 return nacl_module_list_.end();
2578 } 2581 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/extensions/external_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698