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

Side by Side Diff: chrome/browser/extensions/updater/extension_downloader.cc

Issue 10534148: Better logging in extension update code for case of invalid crx urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 (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/extensions/updater/extension_downloader.h" 5 #include "chrome/browser/extensions/updater/extension_downloader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 } 537 }
538 } 538 }
539 539
540 // Begins (or queues up) download of an updated extension. 540 // Begins (or queues up) download of an updated extension.
541 void ExtensionDownloader::FetchUpdatedExtension(const std::string& id, 541 void ExtensionDownloader::FetchUpdatedExtension(const std::string& id,
542 const GURL& url, 542 const GURL& url,
543 const std::string& hash, 543 const std::string& hash,
544 const std::string& version) { 544 const std::string& version) {
545 if (!url.is_valid()) { 545 if (!url.is_valid()) {
546 // TODO(asargent): This can sometimes be invalid. See crbug.com/130881. 546 // TODO(asargent): This can sometimes be invalid. See crbug.com/130881.
547 LOG(ERROR) << "Invalid URL: " << url.spec(); 547 LOG(ERROR) << "Invalid URL: '" << url.possibly_invalid_spec()
548 << "' for extension " << id;
548 return; 549 return;
549 } 550 }
550 551
551 for (std::deque<ExtensionFetch>::const_iterator iter = 552 for (std::deque<ExtensionFetch>::const_iterator iter =
552 extensions_pending_.begin(); 553 extensions_pending_.begin();
553 iter != extensions_pending_.end(); ++iter) { 554 iter != extensions_pending_.end(); ++iter) {
554 if (iter->id == id || iter->url == url) { 555 if (iter->id == id || iter->url == url) {
555 return; // already scheduled 556 return; // already scheduled
556 } 557 }
557 } 558 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 } 649 }
649 650
650 void ExtensionDownloader::NotifyUpdateFound(const std::string& id) { 651 void ExtensionDownloader::NotifyUpdateFound(const std::string& id) {
651 content::NotificationService::current()->Notify( 652 content::NotificationService::current()->Notify(
652 chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND, 653 chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND,
653 content::NotificationService::AllBrowserContextsAndSources(), 654 content::NotificationService::AllBrowserContextsAndSources(),
654 content::Details<const std::string>(&id)); 655 content::Details<const std::string>(&id));
655 } 656 }
656 657
657 } // namespace extensions 658 } // namespace extensions
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