| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/drive/drive_app_provider.h" | 5 #include "chrome/browser/apps/drive/drive_app_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "chrome/browser/apps/drive/drive_app_mapping.h" | 16 #include "chrome/browser/apps/drive/drive_app_mapping.h" |
| 17 #include "chrome/browser/apps/drive/drive_app_uninstall_sync_service.h" | 17 #include "chrome/browser/apps/drive/drive_app_uninstall_sync_service.h" |
| 18 #include "chrome/browser/apps/drive/drive_service_bridge.h" | 18 #include "chrome/browser/apps/drive/drive_service_bridge.h" |
| 19 #include "chrome/browser/drive/drive_app_registry.h" | |
| 20 #include "chrome/browser/drive/fake_drive_service.h" | |
| 21 #include "chrome/browser/extensions/crx_installer.h" | 19 #include "chrome/browser/extensions/crx_installer.h" |
| 22 #include "chrome/browser/extensions/extension_browsertest.h" | 20 #include "chrome/browser/extensions/extension_browsertest.h" |
| 23 #include "chrome/browser/extensions/install_tracker.h" | 21 #include "chrome/browser/extensions/install_tracker.h" |
| 24 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 22 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 25 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | 23 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
| 26 #include "chrome/common/chrome_paths.h" | 24 #include "chrome/common/chrome_paths.h" |
| 27 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 25 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| 28 #include "chrome/common/web_application_info.h" | 26 #include "chrome/common/web_application_info.h" |
| 27 #include "components/drive/drive_app_registry.h" |
| 28 #include "components/drive/service/fake_drive_service.h" |
| 29 #include "content/public/test/test_utils.h" | 29 #include "content/public/test/test_utils.h" |
| 30 #include "extensions/browser/extension_registry.h" | 30 #include "extensions/browser/extension_registry.h" |
| 31 #include "extensions/browser/extension_system.h" | 31 #include "extensions/browser/extension_system.h" |
| 32 | 32 |
| 33 using extensions::AppLaunchInfo; | 33 using extensions::AppLaunchInfo; |
| 34 using extensions::Extension; | 34 using extensions::Extension; |
| 35 using extensions::ExtensionRegistry; | 35 using extensions::ExtensionRegistry; |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 kDriveAppId, kDriveAppName, kChromeAppId, kLaunchUrl, true); | 617 kDriveAppId, kDriveAppName, kChromeAppId, kLaunchUrl, true); |
| 618 RefreshDriveAppRegistry(); | 618 RefreshDriveAppRegistry(); |
| 619 WaitForPendingDriveAppConverters(); | 619 WaitForPendingDriveAppConverters(); |
| 620 | 620 |
| 621 // The app should be gone. | 621 // The app should be gone. |
| 622 chrome_app_id = mapping()->GetChromeApp(kDriveAppId); | 622 chrome_app_id = mapping()->GetChromeApp(kDriveAppId); |
| 623 EXPECT_TRUE(chrome_app_id.empty()); | 623 EXPECT_TRUE(chrome_app_id.empty()); |
| 624 EXPECT_FALSE(ExtensionRegistry::Get(profile())->GetExtensionById( | 624 EXPECT_FALSE(ExtensionRegistry::Get(profile())->GetExtensionById( |
| 625 chrome_app_id, ExtensionRegistry::EVERYTHING)); | 625 chrome_app_id, ExtensionRegistry::EVERYTHING)); |
| 626 } | 626 } |
| OLD | NEW |