OLD | NEW |
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/logging.h" | 10 #include "base/logging.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 int type, | 456 int type, |
457 const content::NotificationSource& source, | 457 const content::NotificationSource& source, |
458 const content::NotificationDetails& details) { | 458 const content::NotificationDetails& details) { |
459 // Event notification sequence. | 459 // Event notification sequence. |
460 // | 460 // |
461 // (User action) (Notification type) | 461 // (User action) (Notification type) |
462 // Install: INSTALLED. | 462 // Install: INSTALLED. |
463 // Update: INSTALLED. | 463 // Update: INSTALLED. |
464 // Uninstall: UNLOADED(UNINSTALL). | 464 // Uninstall: UNLOADED(UNINSTALL). |
465 // Launch, Close: No notification. | 465 // Launch, Close: No notification. |
466 // Enable: EABLED. | 466 // Enable: ENABLED. |
467 // Disable: UNLOADED(DISABLE). | 467 // Disable: UNLOADED(DISABLE). |
468 // Reload, Restart: UNLOADED(DISABLE) -> INSTALLED -> ENABLED. | 468 // Reload, Restart: UNLOADED(DISABLE) -> INSTALLED -> ENABLED. |
469 // | 469 // |
470 switch (type) { | 470 switch (type) { |
471 case chrome::NOTIFICATION_EXTENSION_INSTALLED: | 471 case chrome::NOTIFICATION_EXTENSION_INSTALLED: |
472 HandleExtensionInstalled(details); | 472 HandleExtensionInstalled(details); |
473 break; | 473 break; |
474 case chrome::NOTIFICATION_EXTENSION_UNLOADED: | 474 case chrome::NOTIFICATION_EXTENSION_UNLOADED: |
475 HandleExtensionUnloaded(type, details); | 475 HandleExtensionUnloaded(type, details); |
476 break; | 476 break; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 syncer::APPS); | 568 syncer::APPS); |
569 remote_file_service_->SetSyncEnabled(sync_enabled_); | 569 remote_file_service_->SetSyncEnabled(sync_enabled_); |
570 if (sync_enabled_) { | 570 if (sync_enabled_) { |
571 base::MessageLoopProxy::current()->PostTask( | 571 base::MessageLoopProxy::current()->PostTask( |
572 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, | 572 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, |
573 AsWeakPtr())); | 573 AsWeakPtr())); |
574 } | 574 } |
575 } | 575 } |
576 | 576 |
577 } // namespace sync_file_system | 577 } // namespace sync_file_system |
OLD | NEW |