OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_sync_service.h" | 5 #include "chrome/browser/extensions/extension_sync_service.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "extensions/common/feature_switch.h" | 34 #include "extensions/common/feature_switch.h" |
35 #include "extensions/common/manifest_constants.h" | 35 #include "extensions/common/manifest_constants.h" |
36 #include "extensions/common/manifest_handlers/icons_handler.h" | 36 #include "extensions/common/manifest_handlers/icons_handler.h" |
37 #include "sync/api/sync_change.h" | 37 #include "sync/api/sync_change.h" |
38 #include "sync/api/sync_error_factory.h" | 38 #include "sync/api/sync_error_factory.h" |
39 #include "ui/gfx/image/image_family.h" | 39 #include "ui/gfx/image/image_family.h" |
40 | 40 |
41 using extensions::Extension; | 41 using extensions::Extension; |
42 using extensions::ExtensionPrefs; | 42 using extensions::ExtensionPrefs; |
43 using extensions::ExtensionRegistry; | 43 using extensions::ExtensionRegistry; |
44 using extensions::FeatureSwitch; | |
45 | 44 |
46 namespace { | 45 namespace { |
47 | 46 |
48 void OnWebApplicationInfoLoaded( | 47 void OnWebApplicationInfoLoaded( |
49 WebApplicationInfo synced_info, | 48 WebApplicationInfo synced_info, |
50 base::WeakPtr<ExtensionService> extension_service, | 49 base::WeakPtr<ExtensionService> extension_service, |
51 const WebApplicationInfo& loaded_info) { | 50 const WebApplicationInfo& loaded_info) { |
52 DCHECK_EQ(synced_info.app_url, loaded_info.app_url); | 51 DCHECK_EQ(synced_info.app_url, loaded_info.app_url); |
53 | 52 |
54 if (!extension_service) | 53 if (!extension_service) |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 app_sync_bundle_.SyncChangeIfNeeded(extension); | 543 app_sync_bundle_.SyncChangeIfNeeded(extension); |
545 else if (extension_service_->is_ready() && !flare_.is_null()) | 544 else if (extension_service_->is_ready() && !flare_.is_null()) |
546 flare_.Run(syncer::APPS); | 545 flare_.Run(syncer::APPS); |
547 } else if (extensions::util::ShouldSyncExtension(&extension, profile_)) { | 546 } else if (extensions::util::ShouldSyncExtension(&extension, profile_)) { |
548 if (extension_sync_bundle_.IsSyncing()) | 547 if (extension_sync_bundle_.IsSyncing()) |
549 extension_sync_bundle_.SyncChangeIfNeeded(extension); | 548 extension_sync_bundle_.SyncChangeIfNeeded(extension); |
550 else if (extension_service_->is_ready() && !flare_.is_null()) | 549 else if (extension_service_->is_ready() && !flare_.is_null()) |
551 flare_.Run(syncer::EXTENSIONS); | 550 flare_.Run(syncer::EXTENSIONS); |
552 } | 551 } |
553 } | 552 } |
OLD | NEW |