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

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

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/blacklist.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/download/download_commands.h" 5 #include "chrome/browser/download/download_commands.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/download/download_crx_util.h" 9 #include "chrome/browser/download/download_crx_util.h"
10 #include "chrome/browser/download/download_extensions.h" 10 #include "chrome/browser/download/download_extensions.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 case DISCARD: 182 case DISCARD:
183 download_item_->Remove(); 183 download_item_->Remove();
184 break; 184 break;
185 case KEEP: 185 case KEEP:
186 download_item_->ValidateDangerousDownload(); 186 download_item_->ValidateDangerousDownload();
187 break; 187 break;
188 case LEARN_MORE_SCANNING: { 188 case LEARN_MORE_SCANNING: {
189 #if defined(FULL_SAFE_BROWSING) 189 #if defined(FULL_SAFE_BROWSING)
190 using safe_browsing::DownloadProtectionService; 190 using safe_browsing::DownloadProtectionService;
191 191
192 SafeBrowsingService* sb_service = 192 safe_browsing::SafeBrowsingService* sb_service =
193 g_browser_process->safe_browsing_service(); 193 g_browser_process->safe_browsing_service();
194 DownloadProtectionService* protection_service = 194 DownloadProtectionService* protection_service =
195 (sb_service ? sb_service->download_protection_service() : nullptr); 195 (sb_service ? sb_service->download_protection_service() : nullptr);
196 if (protection_service) 196 if (protection_service)
197 protection_service->ShowDetailsForDownload(*download_item_, 197 protection_service->ShowDetailsForDownload(*download_item_,
198 GetBrowser()); 198 GetBrowser());
199 #else 199 #else
200 // Should only be getting invoked if we are using safe browsing. 200 // Should only be getting invoked if we are using safe browsing.
201 NOTREACHED(); 201 NOTREACHED();
202 #endif 202 #endif
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 is_adobe_pdf_reader_up_to_date = 239 is_adobe_pdf_reader_up_to_date =
240 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); 240 DownloadTargetDeterminer::IsAdobeReaderUpToDate();
241 } 241 }
242 return IsDownloadPdf() && 242 return IsDownloadPdf() &&
243 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date 243 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
244 : true); 244 : true);
245 #elif defined(OS_MACOSX) || defined(OS_LINUX) 245 #elif defined(OS_MACOSX) || defined(OS_LINUX)
246 return IsDownloadPdf(); 246 return IsDownloadPdf();
247 #endif 247 #endif
248 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/blacklist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698