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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_data.cc

Issue 2506713002: Avoid parsing the webstore base url so much. (Closed)
Patch Set: fix chromeos Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/inline_install_private/inline_install_private_apitest.cc » ('j') | 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/chromeos/app_mode/kiosk_app_data.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 return; 655 return;
656 656
657 if (!CheckResponseKeyValue(webstore_data.get(), kLocalizedNameKey, &name_)) 657 if (!CheckResponseKeyValue(webstore_data.get(), kLocalizedNameKey, &name_))
658 return; 658 return;
659 659
660 std::string icon_url_string; 660 std::string icon_url_string;
661 if (!CheckResponseKeyValue(webstore_data.get(), kIconUrlKey, 661 if (!CheckResponseKeyValue(webstore_data.get(), kIconUrlKey,
662 &icon_url_string)) 662 &icon_url_string))
663 return; 663 return;
664 664
665 GURL icon_url = GURL(extension_urls::GetWebstoreLaunchURL()).Resolve( 665 GURL icon_url =
666 icon_url_string); 666 extension_urls::GetWebstoreLaunchURL().Resolve(icon_url_string);
667 if (!icon_url.is_valid()) { 667 if (!icon_url.is_valid()) {
668 LOG(ERROR) << "Webstore response error (icon url): " 668 LOG(ERROR) << "Webstore response error (icon url): "
669 << ValueToString(*webstore_data); 669 << ValueToString(*webstore_data);
670 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError); 670 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError);
671 return; 671 return;
672 } 672 }
673 673
674 // WebstoreDataParser deletes itself when done. 674 // WebstoreDataParser deletes itself when done.
675 (new WebstoreDataParser(AsWeakPtr()))->Start(app_id_, 675 (new WebstoreDataParser(AsWeakPtr()))->Start(app_id_,
676 manifest, 676 manifest,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 718
719 SkBitmap icon = crx_loader->icon(); 719 SkBitmap icon = crx_loader->icon();
720 if (icon.empty()) 720 if (icon.empty())
721 icon = *extensions::util::GetDefaultAppIcon().bitmap(); 721 icon = *extensions::util::GetDefaultAppIcon().bitmap();
722 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); 722 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version());
723 723
724 SetStatus(STATUS_LOADED); 724 SetStatus(STATUS_LOADED);
725 } 725 }
726 726
727 } // namespace chromeos 727 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/inline_install_private/inline_install_private_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698