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

Side by Side Diff: chrome/browser/download/download_crx_util.cc

Issue 16398010: Move some extension manifest consistency checks to BackgroundManifestHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/active_tab_permission_granter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Download code which handles CRX files (extensions, themes, apps, ...). 5 // Download code which handles CRX files (extensions, themes, apps, ...).
6 6
7 #include "chrome/browser/download/download_crx_util.h" 7 #include "chrome/browser/download/download_crx_util.h"
8 8
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/extension_system.h" 12 #include "chrome/browser/extensions/extension_system.h"
13 #include "chrome/browser/extensions/webstore_installer.h" 13 #include "chrome/browser/extensions/webstore_installer.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/browser_finder.h" 15 #include "chrome/browser/ui/browser_finder.h"
16 #include "chrome/browser/ui/host_desktop.h" 16 #include "chrome/browser/ui/host_desktop.h"
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" 17 #include "chrome/browser/ui/tabs/tab_strip_model.h"
18 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
19 #include "chrome/common/extensions/user_script.h"
19 #include "content/public/browser/download_item.h" 20 #include "content/public/browser/download_item.h"
20 #include "content/public/browser/notification_service.h" 21 #include "content/public/browser/notification_service.h"
21 22
22 using content::BrowserThread; 23 using content::BrowserThread;
23 using content::DownloadItem; 24 using content::DownloadItem;
24 using extensions::WebstoreInstaller; 25 using extensions::WebstoreInstaller;
25 26
26 namespace download_crx_util { 27 namespace download_crx_util {
27 28
28 namespace { 29 namespace {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // The referrer URL must also be whitelisted, unless the URL has the file 142 // The referrer URL must also be whitelisted, unless the URL has the file
142 // scheme (there's no referrer for those URLs). 143 // scheme (there's no referrer for those URLs).
143 // TODO(aa): RefererURL is cleared in some cases, for example when going 144 // TODO(aa): RefererURL is cleared in some cases, for example when going
144 // between secure and non-secure URLs. It would be better if DownloadItem 145 // between secure and non-secure URLs. It would be better if DownloadItem
145 // tracked the initiating page explicitly. 146 // tracked the initiating page explicitly.
146 return url_patterns.MatchesURL(item.GetReferrerUrl()) || 147 return url_patterns.MatchesURL(item.GetReferrerUrl()) ||
147 item.GetURL().SchemeIsFile(); 148 item.GetURL().SchemeIsFile();
148 } 149 }
149 150
150 } // namespace download_crx_util 151 } // namespace download_crx_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/active_tab_permission_granter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698