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

Side by Side Diff: chrome/browser/chromeos/enterprise_extension_observer.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
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/chromeos/enterprise_extension_observer.h" 5 #include "chrome/browser/chromeos/enterprise_extension_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 16 matching lines...) Expand all
27 27
28 void EnterpriseExtensionObserver::Observe( 28 void EnterpriseExtensionObserver::Observe(
29 int type, 29 int type,
30 const content::NotificationSource& source, 30 const content::NotificationSource& source,
31 const content::NotificationDetails& details) { 31 const content::NotificationDetails& details) {
32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
33 DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED); 33 DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED);
34 if (content::Source<Profile>(source).ptr() != profile_) { 34 if (content::Source<Profile>(source).ptr() != profile_) {
35 return; 35 return;
36 } 36 }
37 Extension* extension = content::Details<Extension>(details).ptr(); 37 extensions::Extension* extension =
38 if (extension->location() != Extension::EXTERNAL_POLICY_DOWNLOAD) { 38 content::Details<extensions::Extension>(details).ptr();
39 if (extension->location() !=
40 extensions::Extension::EXTERNAL_POLICY_DOWNLOAD) {
39 return; 41 return;
40 } 42 }
41 BrowserThread::PostTask( 43 BrowserThread::PostTask(
42 BrowserThread::FILE, 44 BrowserThread::FILE,
43 FROM_HERE, 45 FROM_HERE,
44 base::Bind( 46 base::Bind(
45 &EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd, 47 &EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd,
46 extension->path())); 48 extension->path()));
47 } 49 }
48 50
(...skipping 10 matching lines...) Expand all
59 } 61 }
60 } 62 }
61 63
62 // static 64 // static
63 void EnterpriseExtensionObserver::NotifyEntd() { 65 void EnterpriseExtensionObserver::NotifyEntd() {
64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
65 DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd(); 67 DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd();
66 } 68 }
67 69
68 } // namespace chromeos 70 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698