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

Side by Side Diff: chrome/browser/extensions/external_policy_extension_loader.cc

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webstore_private_apitest.cc ('k') | chrome/browser/extensions/image_loading_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698