OLD | NEW |
---|---|
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
571 bool success = reporter_process.WaitForExit(&exit_code); | 571 bool success = reporter_process.WaitForExit(&exit_code); |
572 DCHECK(success); | 572 DCHECK(success); |
573 } else { | 573 } else { |
574 uma.RecordReporterStep(SW_REPORTER_FAILED_TO_START); | 574 uma.RecordReporterStep(SW_REPORTER_FAILED_TO_START); |
575 } | 575 } |
576 return exit_code; | 576 return exit_code; |
577 } | 577 } |
578 | 578 |
579 } // namespace | 579 } // namespace |
580 | 580 |
581 void DisplaySRTPromptForTesting() { | |
582 DisplaySRTPrompt(base::FilePath()); | |
mattm
2017/03/14 18:46:14
It seems the appearance will differ depending on i
kylix_rd
2017/03/14 20:06:32
Done.
| |
583 } | |
584 | |
581 // Class that will attempt to download the SRT, showing the SRT notification | 585 // Class that will attempt to download the SRT, showing the SRT notification |
582 // bubble when the download operation is complete. Instances of SRTFetcher own | 586 // bubble when the download operation is complete. Instances of SRTFetcher own |
583 // themselves, they will self-delete on completion of the network request when | 587 // themselves, they will self-delete on completion of the network request when |
584 // OnURLFetchComplete is called. | 588 // OnURLFetchComplete is called. |
585 class SRTFetcher : public net::URLFetcherDelegate { | 589 class SRTFetcher : public net::URLFetcherDelegate { |
586 public: | 590 public: |
587 explicit SRTFetcher(Profile* profile) | 591 explicit SRTFetcher(Profile* profile) |
588 : profile_(profile), | 592 : profile_(profile), |
589 url_fetcher_(net::URLFetcher::Create(0, | 593 url_fetcher_(net::URLFetcher::Create(0, |
590 GURL(GetSRTDownloadURL()), | 594 GURL(GetSRTDownloadURL()), |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1068 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(), | 1072 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(), |
1069 KEY_QUERY_VALUE) == ERROR_SUCCESS && | 1073 KEY_QUERY_VALUE) == ERROR_SUCCESS && |
1070 srt_cleaner_key.GetValueCount() > 0; | 1074 srt_cleaner_key.GetValueCount() > 0; |
1071 } | 1075 } |
1072 | 1076 |
1073 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { | 1077 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { |
1074 g_testing_delegate_ = delegate; | 1078 g_testing_delegate_ = delegate; |
1075 } | 1079 } |
1076 | 1080 |
1077 } // namespace safe_browsing | 1081 } // namespace safe_browsing |
OLD | NEW |