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

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

Issue 419163003: Windows: Fix a corner case where we still think Adobe Reader is up to date after it has been uninst… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_target_determiner.h" 5 #include "chrome/browser/download/download_target_determiner.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 512
513 DownloadTargetDeterminer::Result 513 DownloadTargetDeterminer::Result
514 DownloadTargetDeterminer::DoDetermineIfAdobeReaderUpToDate() { 514 DownloadTargetDeterminer::DoDetermineIfAdobeReaderUpToDate() {
515 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 515 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
516 516
517 next_state_ = STATE_CHECK_DOWNLOAD_URL; 517 next_state_ = STATE_CHECK_DOWNLOAD_URL;
518 518
519 #if defined(OS_WIN) 519 #if defined(OS_WIN)
520 if (!local_path_.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) 520 if (!local_path_.MatchesExtension(FILE_PATH_LITERAL(".pdf")))
521 return CONTINUE; 521 return CONTINUE;
522 if (!IsAdobeReaderDefaultPDFViewer()) 522 if (!IsAdobeReaderDefaultPDFViewer()) {
523 g_is_adobe_reader_up_to_date_ = false;
523 return CONTINUE; 524 return CONTINUE;
525 }
524 526
525 base::PostTaskAndReplyWithResult( 527 base::PostTaskAndReplyWithResult(
526 BrowserThread::GetBlockingPool(), 528 BrowserThread::GetBlockingPool(),
527 FROM_HERE, 529 FROM_HERE,
528 base::Bind(&::IsAdobeReaderUpToDate), 530 base::Bind(&::IsAdobeReaderUpToDate),
529 base::Bind(&DownloadTargetDeterminer::DetermineIfAdobeReaderUpToDateDone, 531 base::Bind(&DownloadTargetDeterminer::DetermineIfAdobeReaderUpToDateDone,
530 weak_ptr_factory_.GetWeakPtr())); 532 weak_ptr_factory_.GetWeakPtr()));
531 return QUIT_DOLOOP; 533 return QUIT_DOLOOP;
532 #else 534 #else
533 return CONTINUE; 535 return CONTINUE;
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 const base::FilePath& suggested_path) { 879 const base::FilePath& suggested_path) {
878 return base::FilePath(suggested_path.value() + kCrdownloadSuffix); 880 return base::FilePath(suggested_path.value() + kCrdownloadSuffix);
879 } 881 }
880 882
881 #if defined(OS_WIN) 883 #if defined(OS_WIN)
882 // static 884 // static
883 bool DownloadTargetDeterminer::IsAdobeReaderUpToDate() { 885 bool DownloadTargetDeterminer::IsAdobeReaderUpToDate() {
884 return g_is_adobe_reader_up_to_date_; 886 return g_is_adobe_reader_up_to_date_;
885 } 887 }
886 #endif 888 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698