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

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

Issue 4687005: Track permissions granted to extensions in prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed updating a method call Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 utility implementation 5 // Download utility implementation
6 6
7 #include "chrome/browser/download/download_util.h" 7 #include "chrome/browser/download/download_util.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <shobjidl.h> 10 #include <shobjidl.h>
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 if (UserScript::HasUserScriptFileExtension(download_item.url())) { 247 if (UserScript::HasUserScriptFileExtension(download_item.url())) {
248 installer->InstallUserScript(download_item.full_path(), 248 installer->InstallUserScript(download_item.full_path(),
249 download_item.url()); 249 download_item.url());
250 return; 250 return;
251 } 251 }
252 252
253 bool is_gallery_download = service->IsDownloadFromGallery( 253 bool is_gallery_download = service->IsDownloadFromGallery(
254 download_item.url(), download_item.referrer_url()); 254 download_item.url(), download_item.referrer_url());
255 installer->set_original_mime_type(download_item.original_mime_type()); 255 installer->set_original_mime_type(download_item.original_mime_type());
256 installer->set_apps_require_extension_mime_type(true); 256 installer->set_apps_require_extension_mime_type(true);
257 installer->set_allow_privilege_increase(true);
258 installer->set_original_url(download_item.url()); 257 installer->set_original_url(download_item.url());
259 installer->set_is_gallery_install(is_gallery_download); 258 installer->set_is_gallery_install(is_gallery_download);
260 installer->InstallCrx(download_item.full_path()); 259 installer->InstallCrx(download_item.full_path());
261 installer->set_allow_silent_install(is_gallery_download); 260 installer->set_allow_silent_install(is_gallery_download);
262 } 261 }
263 262
264 // Download progress painting -------------------------------------------------- 263 // Download progress painting --------------------------------------------------
265 264
266 // Common bitmaps used for download progress animations. We load them once the 265 // Common bitmaps used for download progress animations. We load them once the
267 // first time we do a progress paint, then reuse them as they are always the 266 // first time we do a progress paint, then reuse them as they are always the
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 ExtensionsService* service = profile->GetExtensionsService(); 732 ExtensionsService* service = profile->GetExtensionsService();
734 if (!service || 733 if (!service ||
735 !service->IsDownloadFromGallery(info->url, info->referrer_url)) { 734 !service->IsDownloadFromGallery(info->url, info->referrer_url)) {
736 return true; 735 return true;
737 } 736 }
738 } 737 }
739 return false; 738 return false;
740 } 739 }
741 740
742 } // namespace download_util 741 } // namespace download_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698