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

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

Issue 145153002: Make sideloaded (externally installed) extensions display webstore info (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ChromeOS fix Created 6 years, 10 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
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/file_util.h" 10 #include "base/file_util.h"
(...skipping 24 matching lines...) Expand all
35 using content::BrowserThread; 35 using content::BrowserThread;
36 36
37 namespace chromeos { 37 namespace chromeos {
38 38
39 namespace { 39 namespace {
40 40
41 // Keys for local state data. See sample layout in KioskAppManager. 41 // Keys for local state data. See sample layout in KioskAppManager.
42 const char kKeyName[] = "name"; 42 const char kKeyName[] = "name";
43 const char kKeyIcon[] = "icon"; 43 const char kKeyIcon[] = "icon";
44 44
45 // Web store data keys.
46 const char kManifestKey[] = "manifest";
47 const char kIconUrlKey[] = "icon_url";
48 const char kLocalizedNameKey[] = "localized_name";
49
50 const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse"; 45 const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse";
51 46
52 // Icon file extension. 47 // Icon file extension.
53 const char kIconFileExtension[] = ".png"; 48 const char kIconFileExtension[] = ".png";
54 49
55 // Save |raw_icon| for given |app_id|. 50 // Save |raw_icon| for given |app_id|.
56 void SaveIconToLocalOnBlockingPool( 51 void SaveIconToLocalOnBlockingPool(
57 const base::FilePath& icon_path, 52 const base::FilePath& icon_path,
58 scoped_refptr<base::RefCountedString> raw_icon) { 53 scoped_refptr<base::RefCountedString> raw_icon) {
59 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); 54 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 if (!response->GetString(key, value)) { 493 if (!response->GetString(key, value)) {
499 LOG(ERROR) << "Webstore response error (" << key 494 LOG(ERROR) << "Webstore response error (" << key
500 << "): " << ValueToString(response); 495 << "): " << ValueToString(response);
501 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError); 496 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError);
502 return false; 497 return false;
503 } 498 }
504 return true; 499 return true;
505 } 500 }
506 501
507 } // namespace chromeos 502 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/nibs/ExtensionInstallPromptWebstoreData.xib ('k') | chrome/browser/chromeos/file_manager/app_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698