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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 2767173002: [MD Extensions] Respond with a load error when loading unpacked fails (Closed)
Patch Set: Created 3 years, 9 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 (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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // EntryPickerClient: 388 // EntryPickerClient:
389 void FileSelected(const base::FilePath& path) override; 389 void FileSelected(const base::FilePath& path) override;
390 void FileSelectionCanceled() override; 390 void FileSelectionCanceled() override;
391 391
392 // Callback for the UnpackedLoader. 392 // Callback for the UnpackedLoader.
393 void OnLoadComplete(const Extension* extension, 393 void OnLoadComplete(const Extension* extension,
394 const base::FilePath& file_path, 394 const base::FilePath& file_path,
395 const std::string& error); 395 const std::string& error);
396 396
397 private: 397 private:
398 void OnGotManifestError(const base::FilePath& file_path,
399 const std::string& error,
400 size_t line_number,
401 const std::string& manifest);
402
398 // Whether or not we should fail quietly in the event of a load error. 403 // Whether or not we should fail quietly in the event of a load error.
399 bool fail_quietly_; 404 bool fail_quietly_ = false;
405
406 // Whether we populate a load error on failure.
lazyboy 2017/03/22 21:38:46 nit: populate developer_private::LoadError on fail
Devlin 2017/03/23 01:30:59 Done.
407 bool populate_error_ = false;
400 }; 408 };
401 409
402 class DeveloperPrivateChoosePathFunction 410 class DeveloperPrivateChoosePathFunction
403 : public DeveloperPrivateChooseEntryFunction { 411 : public DeveloperPrivateChooseEntryFunction {
404 public: 412 public:
405 DECLARE_EXTENSION_FUNCTION("developerPrivate.choosePath", 413 DECLARE_EXTENSION_FUNCTION("developerPrivate.choosePath",
406 DEVELOPERPRIVATE_CHOOSEPATH); 414 DEVELOPERPRIVATE_CHOOSEPATH);
407 415
408 protected: 416 protected:
409 ~DeveloperPrivateChoosePathFunction() override; 417 ~DeveloperPrivateChoosePathFunction() override;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 protected: 612 protected:
605 ~DeveloperPrivateUpdateExtensionCommandFunction() override; 613 ~DeveloperPrivateUpdateExtensionCommandFunction() override;
606 ResponseAction Run() override; 614 ResponseAction Run() override;
607 }; 615 };
608 616
609 } // namespace api 617 } // namespace api
610 618
611 } // namespace extensions 619 } // namespace extensions
612 620
613 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 621 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698