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

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer.cc

Issue 10980002: Mac Web Intents Part 1: Show extension download progress (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove downloads code Created 8 years, 2 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
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/webstore_inline_installer.h" 5 #include "chrome/browser/extensions/webstore_inline_installer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 Release(); // Matches the AddRef in BeginInstall. 416 Release(); // Matches the AddRef in BeginInstall.
417 } 417 }
418 } 418 }
419 419
420 void WebstoreInlineInstaller::OnExtensionInstallSuccess(const std::string& id) { 420 void WebstoreInlineInstaller::OnExtensionInstallSuccess(const std::string& id) {
421 CHECK_EQ(id_, id); 421 CHECK_EQ(id_, id);
422 CompleteInstall(""); 422 CompleteInstall("");
423 } 423 }
424 424
425 void WebstoreInlineInstaller::OnExtensionInstallFailure( 425 void WebstoreInlineInstaller::OnExtensionInstallFailure(
426 const std::string& id, const std::string& error) { 426 const std::string& id,
427 const std::string& error,
428 WebstoreInstaller::FailureReason cancelled) {
427 CHECK_EQ(id_, id); 429 CHECK_EQ(id_, id);
428 CompleteInstall(error); 430 CompleteInstall(error);
429 } 431 }
430 432
431 void WebstoreInlineInstaller::CompleteInstall(const std::string& error) { 433 void WebstoreInlineInstaller::CompleteInstall(const std::string& error) {
432 if (!callback_.is_null()) 434 if (!callback_.is_null())
433 callback_.Run(error.empty(), error); 435 callback_.Run(error.empty(), error);
434 436
435 Release(); // Matches the AddRef in BeginInstall. 437 Release(); // Matches the AddRef in BeginInstall.
436 } 438 }
(...skipping 17 matching lines...) Expand all
454 DLOG(WARNING) << "Could not parse " << verified_site_url << 456 DLOG(WARNING) << "Could not parse " << verified_site_url <<
455 " as URL pattern " << parse_result; 457 " as URL pattern " << parse_result;
456 return false; 458 return false;
457 } 459 }
458 verified_site_pattern.SetScheme("*"); 460 verified_site_pattern.SetScheme("*");
459 461
460 return verified_site_pattern.MatchesURL(requestor_url); 462 return verified_site_pattern.MatchesURL(requestor_url);
461 } 463 }
462 464
463 } // namespace extensions 465 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.h ('k') | chrome/browser/extensions/webstore_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698