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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 1659203002: Remove HostDesktopType from FindLastActive[WithProfile] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr 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 (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 #include "chrome/browser/ui/startup/default_browser_prompt.h" 5 #include "chrome/browser/ui/startup/default_browser_prompt.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 void CheckDefaultBrowserObserver::ResetCheckDefaultBrowserPref() { 255 void CheckDefaultBrowserObserver::ResetCheckDefaultBrowserPref() {
256 Profile* profile = 256 Profile* profile =
257 g_browser_process->profile_manager()->GetProfileByPath(profile_path_); 257 g_browser_process->profile_manager()->GetProfileByPath(profile_path_);
258 if (profile) 258 if (profile)
259 profile->GetPrefs()->SetBoolean(prefs::kCheckDefaultBrowser, true); 259 profile->GetPrefs()->SetBoolean(prefs::kCheckDefaultBrowser, true);
260 } 260 }
261 261
262 void CheckDefaultBrowserObserver::ShowPrompt() { 262 void CheckDefaultBrowserObserver::ShowPrompt() {
263 Browser* browser = chrome::FindLastActiveWithHostDesktopType(desktop_type_); 263 Browser* browser = chrome::FindLastActive();
264 if (!browser) 264 if (!browser)
265 return; // Reached during ui tests. 265 return; // Reached during ui tests.
266 266
267 // In ChromeBot tests, there might be a race. This line appears to get 267 // In ChromeBot tests, there might be a race. This line appears to get
268 // called during shutdown and |tab| can be NULL. 268 // called during shutdown and |tab| can be NULL.
269 content::WebContents* web_contents = 269 content::WebContents* web_contents =
270 browser->tab_strip_model()->GetActiveWebContents(); 270 browser->tab_strip_model()->GetActiveWebContents();
271 if (!web_contents) 271 if (!web_contents)
272 return; 272 return;
273 273
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 ->StartCheckIsDefault(); 327 ->StartCheckIsDefault();
328 } 328 }
329 329
330 #if !defined(OS_WIN) 330 #if !defined(OS_WIN)
331 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 331 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
332 return false; 332 return false;
333 } 333 }
334 #endif 334 #endif
335 335
336 } // namespace chrome 336 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/network_profile_bubble.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698