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

Side by Side Diff: chrome/browser/first_run/first_run.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 years, 4 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 | Annotate | Revision Log
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/first_run/first_run.h" 5 #include "chrome/browser/first_run/first_run.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // chrome infrastructure to be up and running before they can be attempted. 119 // chrome infrastructure to be up and running before they can be attempted.
120 class FirstRunDelayedTasks : public content::NotificationObserver { 120 class FirstRunDelayedTasks : public content::NotificationObserver {
121 public: 121 public:
122 enum Tasks { 122 enum Tasks {
123 NO_TASK, 123 NO_TASK,
124 INSTALL_EXTENSIONS 124 INSTALL_EXTENSIONS
125 }; 125 };
126 126
127 explicit FirstRunDelayedTasks(Tasks task) { 127 explicit FirstRunDelayedTasks(Tasks task) {
128 if (task == INSTALL_EXTENSIONS) { 128 if (task == INSTALL_EXTENSIONS) {
129 registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY, 129 registrar_.Add(this,
130 extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED,
130 content::NotificationService::AllSources()); 131 content::NotificationService::AllSources());
131 } 132 }
132 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, 133 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
133 content::NotificationService::AllSources()); 134 content::NotificationService::AllSources());
134 } 135 }
135 136
136 virtual void Observe(int type, 137 virtual void Observe(int type,
137 const content::NotificationSource& source, 138 const content::NotificationSource& source,
138 const content::NotificationDetails& details) OVERRIDE { 139 const content::NotificationDetails& details) OVERRIDE {
139 // After processing the notification we always delete ourselves. 140 // After processing the notification we always delete ourselves.
140 if (type == chrome::NOTIFICATION_EXTENSIONS_READY) { 141 if (type == extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED) {
141 Profile* profile = content::Source<Profile>(source).ptr(); 142 Profile* profile = content::Source<Profile>(source).ptr();
142 ExtensionService* service = 143 ExtensionService* service =
143 extensions::ExtensionSystem::Get(profile)->extension_service(); 144 extensions::ExtensionSystem::Get(profile)->extension_service();
144 DoExtensionWork(service); 145 DoExtensionWork(service);
145 } 146 }
146 delete this; 147 delete this;
147 } 148 }
148 149
149 private: 150 private:
150 // Private ctor forces it to be created only in the heap. 151 // Private ctor forces it to be created only in the heap.
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 SetShouldDoPersonalDataManagerFirstRun(); 804 SetShouldDoPersonalDataManagerFirstRun();
804 805
805 internal::DoPostImportPlatformSpecificTasks(profile); 806 internal::DoPostImportPlatformSpecificTasks(profile);
806 } 807 }
807 808
808 uint16 auto_import_state() { 809 uint16 auto_import_state() {
809 return g_auto_import_state; 810 return g_auto_import_state;
810 } 811 }
811 812
812 } // namespace first_run 813 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_startup_installer_browsertest.cc ('k') | chrome/browser/infobars/infobars_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698