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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Enum class Created 3 years, 7 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
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/sync_file_system/sync_file_system_service.h" 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id()); 658 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id());
659 DVLOG(1) << "Handle extension notification for INSTALLED: " << app_origin; 659 DVLOG(1) << "Handle extension notification for INSTALLED: " << app_origin;
660 // NOTE: When an app is uninstalled and re-installed in a sequence, 660 // NOTE: When an app is uninstalled and re-installed in a sequence,
661 // |local_service_| may still keeps |app_origin| as disabled origin. 661 // |local_service_| may still keeps |app_origin| as disabled origin.
662 local_service_->SetOriginEnabled(app_origin, true); 662 local_service_->SetOriginEnabled(app_origin, true);
663 } 663 }
664 664
665 void SyncFileSystemService::OnExtensionUnloaded( 665 void SyncFileSystemService::OnExtensionUnloaded(
666 content::BrowserContext* browser_context, 666 content::BrowserContext* browser_context,
667 const Extension* extension, 667 const Extension* extension,
668 extensions::UnloadedExtensionInfo::Reason reason) { 668 extensions::UnloadedExtensionReason reason) {
669 if (reason != extensions::UnloadedExtensionInfo::REASON_DISABLE) 669 if (reason != extensions::UnloadedExtensionReason::REASON_DISABLE)
670 return; 670 return;
671 671
672 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id()); 672 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id());
673 int disable_reasons = 673 int disable_reasons =
674 ExtensionPrefs::Get(profile_)->GetDisableReasons(extension->id()); 674 ExtensionPrefs::Get(profile_)->GetDisableReasons(extension->id());
675 if (disable_reasons & Extension::DISABLE_RELOAD) { 675 if (disable_reasons & Extension::DISABLE_RELOAD) {
676 // Bypass disabling the origin since the app will be re-enabled soon. 676 // Bypass disabling the origin since the app will be re-enabled soon.
677 // NOTE: If re-enabling the app fails, the app is disabled while it is 677 // NOTE: If re-enabling the app fails, the app is disabled while it is
678 // handled as enabled origin in the SyncFS. This should be safe and will be 678 // handled as enabled origin in the SyncFS. This should be safe and will be
679 // recovered when the user re-enables the app manually or the sync service 679 // recovered when the user re-enables the app manually or the sync service
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 void(SyncProcessRunner::*method)()) { 755 void(SyncProcessRunner::*method)()) {
756 for (auto iter = local_sync_runners_.begin(); 756 for (auto iter = local_sync_runners_.begin();
757 iter != local_sync_runners_.end(); ++iter) 757 iter != local_sync_runners_.end(); ++iter)
758 (iter->get()->*method)(); 758 (iter->get()->*method)();
759 for (auto iter = remote_sync_runners_.begin(); 759 for (auto iter = remote_sync_runners_.begin();
760 iter != remote_sync_runners_.end(); ++iter) 760 iter != remote_sync_runners_.end(); ++iter)
761 (iter->get()->*method)(); 761 (iter->get()->*method)();
762 } 762 }
763 763
764 } // namespace sync_file_system 764 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698