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

Side by Side Diff: chrome/browser/safe_browsing/srt_fetcher_win.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 years, 10 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
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/safe_browsing/srt_fetcher_win.h" 5 #include "chrome/browser/safe_browsing/srt_fetcher_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 Browser* browser = chrome::FindLastActive(); 99 Browser* browser = chrome::FindLastActive();
100 if (!browser) 100 if (!browser)
101 return; 101 return;
102 102
103 Profile* profile = browser->profile(); 103 Profile* profile = browser->profile();
104 DCHECK(profile); 104 DCHECK(profile);
105 105
106 // Make sure we have a tabbed browser since we need to anchor the bubble to 106 // Make sure we have a tabbed browser since we need to anchor the bubble to
107 // the toolbar's wrench menu. Create one if none exist already. 107 // the toolbar's wrench menu. Create one if none exist already.
108 if (browser->type() != Browser::TYPE_TABBED) { 108 if (browser->type() != Browser::TYPE_TABBED) {
109 browser = chrome::FindTabbedBrowser(profile, false, desktop_type); 109 browser = chrome::FindTabbedBrowser(profile, false);
110 if (!browser) 110 if (!browser)
111 browser = new Browser(Browser::CreateParams(profile, desktop_type)); 111 browser = new Browser(Browser::CreateParams(profile, desktop_type));
112 } 112 }
113 GlobalErrorService* global_error_service = 113 GlobalErrorService* global_error_service =
114 GlobalErrorServiceFactory::GetForProfile(profile); 114 GlobalErrorServiceFactory::GetForProfile(profile);
115 SRTGlobalError* global_error = 115 SRTGlobalError* global_error =
116 new SRTGlobalError(global_error_service, download_path); 116 new SRTGlobalError(global_error_service, download_path);
117 117
118 // Ownership of |global_error| is passed to the service. The error removes 118 // Ownership of |global_error| is passed to the service. The error removes
119 // itself from the service and self-destructs when done. 119 // itself from the service and self-destructs when done.
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 void SetReporterLauncherForTesting(const ReporterLauncher& reporter_launcher) { 631 void SetReporterLauncherForTesting(const ReporterLauncher& reporter_launcher) {
632 g_reporter_launcher_ = reporter_launcher; 632 g_reporter_launcher_ = reporter_launcher;
633 } 633 }
634 634
635 void SetPromptTriggerForTesting(const PromptTrigger& prompt_trigger) { 635 void SetPromptTriggerForTesting(const PromptTrigger& prompt_trigger) {
636 g_prompt_trigger_ = prompt_trigger; 636 g_prompt_trigger_ = prompt_trigger;
637 } 637 }
638 638
639 } // namespace safe_browsing 639 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698