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

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

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 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 <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 return; 521 return;
522 522
523 Profile* profile = browser->profile(); 523 Profile* profile = browser->profile();
524 DCHECK(profile); 524 DCHECK(profile);
525 525
526 // Make sure we have a tabbed browser since we need to anchor the bubble to 526 // Make sure we have a tabbed browser since we need to anchor the bubble to
527 // the toolbar's wrench menu. Create one if none exist already. 527 // the toolbar's wrench menu. Create one if none exist already.
528 if (browser->type() != Browser::TYPE_TABBED) { 528 if (browser->type() != Browser::TYPE_TABBED) {
529 browser = chrome::FindTabbedBrowser(profile, false); 529 browser = chrome::FindTabbedBrowser(profile, false);
530 if (!browser) 530 if (!browser)
531 browser = new Browser(Browser::CreateParams(profile)); 531 browser = new Browser(Browser::CreateParams(profile, false));
532 } 532 }
533 GlobalErrorService* global_error_service = 533 GlobalErrorService* global_error_service =
534 GlobalErrorServiceFactory::GetForProfile(profile); 534 GlobalErrorServiceFactory::GetForProfile(profile);
535 SRTGlobalError* global_error = 535 SRTGlobalError* global_error =
536 new SRTGlobalError(global_error_service, download_path); 536 new SRTGlobalError(global_error_service, download_path);
537 537
538 // Ownership of |global_error| is passed to the service. The error removes 538 // Ownership of |global_error| is passed to the service. The error removes
539 // itself from the service and self-destructs when done. 539 // itself from the service and self-destructs when done.
540 global_error_service->AddGlobalError(base::WrapUnique(global_error)); 540 global_error_service->AddGlobalError(base::WrapUnique(global_error));
541 541
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(), 1080 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(),
1081 KEY_QUERY_VALUE) == ERROR_SUCCESS && 1081 KEY_QUERY_VALUE) == ERROR_SUCCESS &&
1082 srt_cleaner_key.GetValueCount() > 0; 1082 srt_cleaner_key.GetValueCount() > 0;
1083 } 1083 }
1084 1084
1085 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { 1085 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) {
1086 g_testing_delegate_ = delegate; 1086 g_testing_delegate_ = delegate;
1087 } 1087 }
1088 1088
1089 } // namespace safe_browsing 1089 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager_unittest.cc ('k') | chrome/browser/sessions/better_session_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698