OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/external_policy_extension_loader.h" | 5 #include "chrome/browser/extensions/external_policy_extension_loader.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
13 #include "content/browser/browser_thread.h" | 13 #include "content/browser/browser_thread.h" |
14 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
15 #include "content/common/notification_service.h" | 15 #include "content/public/browser/notification_details.h" |
| 16 #include "content/public/browser/notification_source.h" |
16 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
17 | 18 |
18 namespace { | 19 namespace { |
19 | 20 |
20 // Check an extension ID and an URL to be syntactically correct. | 21 // Check an extension ID and an URL to be syntactically correct. |
21 bool CheckExtension(const std::string& id, const std::string& update_url) { | 22 bool CheckExtension(const std::string& id, const std::string& update_url) { |
22 GURL url(update_url); | 23 GURL url(update_url); |
23 if (!url.is_valid()) { | 24 if (!url.is_valid()) { |
24 LOG(WARNING) << "Policy specifies invalid update URL for external " | 25 LOG(WARNING) << "Policy specifies invalid update URL for external " |
25 << "extension: " << update_url; | 26 << "extension: " << update_url; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 notification_registrar_.RemoveAll(); | 95 notification_registrar_.RemoveAll(); |
95 pref_change_registrar_.RemoveAll(); | 96 pref_change_registrar_.RemoveAll(); |
96 profile_ = NULL; | 97 profile_ = NULL; |
97 } | 98 } |
98 break; | 99 break; |
99 } | 100 } |
100 default: | 101 default: |
101 NOTREACHED() << "Unexpected notification type."; | 102 NOTREACHED() << "Unexpected notification type."; |
102 } | 103 } |
103 } | 104 } |
OLD | NEW |