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/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // After processing the notification we always delete ourselves. | 83 // After processing the notification we always delete ourselves. |
84 if (type == chrome::NOTIFICATION_EXTENSIONS_READY) { | 84 if (type == chrome::NOTIFICATION_EXTENSIONS_READY) { |
85 DoExtensionWork( | 85 DoExtensionWork( |
86 content::Source<Profile>(source).ptr()->GetExtensionService()); | 86 content::Source<Profile>(source).ptr()->GetExtensionService()); |
87 } | 87 } |
88 delete this; | 88 delete this; |
89 } | 89 } |
90 | 90 |
91 private: | 91 private: |
92 // Private ctor forces it to be created only in the heap. | 92 // Private ctor forces it to be created only in the heap. |
93 ~FirstRunDelayedTasks() {} | 93 virtual ~FirstRunDelayedTasks() {} |
94 | 94 |
95 // The extension work is to basically trigger an extension update check. | 95 // The extension work is to basically trigger an extension update check. |
96 // If the extension specified in the master pref is older than the live | 96 // If the extension specified in the master pref is older than the live |
97 // extension it will get updated which is the same as get it installed. | 97 // extension it will get updated which is the same as get it installed. |
98 void DoExtensionWork(ExtensionService* service) { | 98 void DoExtensionWork(ExtensionService* service) { |
99 if (service) | 99 if (service) |
100 service->updater()->CheckNow(extensions::ExtensionUpdater::CheckParams()); | 100 service->updater()->CheckNow(extensions::ExtensionUpdater::CheckParams()); |
101 } | 101 } |
102 | 102 |
103 content::NotificationRegistrar registrar_; | 103 content::NotificationRegistrar registrar_; |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 if (template_url && template_url->GetDefaultSearchProvider()) | 717 if (template_url && template_url->GetDefaultSearchProvider()) |
718 FirstRunBubbleLauncher::ShowFirstRunBubbleSoon(); | 718 FirstRunBubbleLauncher::ShowFirstRunBubbleSoon(); |
719 SetShowWelcomePagePref(); | 719 SetShowWelcomePagePref(); |
720 SetPersonalDataManagerFirstRunPref(); | 720 SetPersonalDataManagerFirstRunPref(); |
721 #endif // !defined(USE_AURA) | 721 #endif // !defined(USE_AURA) |
722 | 722 |
723 internal::DoPostImportPlatformSpecificTasks(); | 723 internal::DoPostImportPlatformSpecificTasks(); |
724 } | 724 } |
725 | 725 |
726 } // namespace first_run | 726 } // namespace first_run |
OLD | NEW |