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

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

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. Created 6 years, 5 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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 DVLOG(1) << "Handle extension notification for UNLOAD(DISABLE): " 655 DVLOG(1) << "Handle extension notification for UNLOAD(DISABLE): "
656 << app_origin; 656 << app_origin;
657 GetRemoteService(app_origin)->DisableOrigin( 657 GetRemoteService(app_origin)->DisableOrigin(
658 app_origin, 658 app_origin,
659 base::Bind(&DidHandleUnloadedEvent, app_origin)); 659 base::Bind(&DidHandleUnloadedEvent, app_origin));
660 local_service_->SetOriginEnabled(app_origin, false); 660 local_service_->SetOriginEnabled(app_origin, false);
661 } 661 }
662 662
663 void SyncFileSystemService::OnExtensionUninstalled( 663 void SyncFileSystemService::OnExtensionUninstalled(
664 content::BrowserContext* browser_context, 664 content::BrowserContext* browser_context,
665 const Extension* extension) { 665 const Extension* extension,
666 extensions::UninstallReason reason) {
666 RemoteFileSyncService::UninstallFlag flag = 667 RemoteFileSyncService::UninstallFlag flag =
667 RemoteFileSyncService::UNINSTALL_AND_PURGE_REMOTE; 668 RemoteFileSyncService::UNINSTALL_AND_PURGE_REMOTE;
668 // If it's loaded from an unpacked package and with key: field, 669 // If it's loaded from an unpacked package and with key: field,
669 // the uninstall will not be sync'ed and the user might be using the 670 // the uninstall will not be sync'ed and the user might be using the
670 // same app key in other installs, so avoid purging the remote folder. 671 // same app key in other installs, so avoid purging the remote folder.
671 if (extensions::Manifest::IsUnpackedLocation(extension->location()) && 672 if (extensions::Manifest::IsUnpackedLocation(extension->location()) &&
672 extension->manifest()->HasKey(extensions::manifest_keys::kKey)) { 673 extension->manifest()->HasKey(extensions::manifest_keys::kKey)) {
673 flag = RemoteFileSyncService::UNINSTALL_AND_KEEP_REMOTE; 674 flag = RemoteFileSyncService::UNINSTALL_AND_KEEP_REMOTE;
674 } 675 }
675 676
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 v2_remote_service_->AddServiceObserver(v2_remote_syncer.get()); 753 v2_remote_service_->AddServiceObserver(v2_remote_syncer.get());
753 v2_remote_service_->AddFileStatusObserver(this); 754 v2_remote_service_->AddFileStatusObserver(this);
754 v2_remote_service_->SetRemoteChangeProcessor(local_service_.get()); 755 v2_remote_service_->SetRemoteChangeProcessor(local_service_.get());
755 v2_remote_service_->SetSyncEnabled(sync_enabled_); 756 v2_remote_service_->SetSyncEnabled(sync_enabled_);
756 remote_sync_runners_.push_back(v2_remote_syncer.release()); 757 remote_sync_runners_.push_back(v2_remote_syncer.release());
757 } 758 }
758 return v2_remote_service_.get(); 759 return v2_remote_service_.get();
759 } 760 }
760 761
761 } // namespace sync_file_system 762 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/sync_file_system_service.h ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698