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

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

Issue 1649173002: Add DisplayLayoutManagerMulti (WIP) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_576375_display3e
Patch Set: Rebase Created 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos/display_layout_manager.js » ('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 (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/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 namespace extensions { 78 namespace extensions {
79 79
80 namespace { 80 namespace {
81 81
82 static bool enable_background_extensions_during_testing = false; 82 static bool enable_background_extensions_during_testing = false;
83 83
84 std::string GenerateId(const base::DictionaryValue* manifest, 84 std::string GenerateId(const base::DictionaryValue* manifest,
85 const base::FilePath& path) { 85 const base::FilePath& path) {
86 std::string raw_key; 86 std::string raw_key;
87 std::string id_input; 87 std::string id_input;
88 CHECK(manifest->GetString(manifest_keys::kPublicKey, &raw_key)); 88 if (!manifest->GetString(manifest_keys::kPublicKey, &raw_key)) {
89 LOG(ERROR) << "No PublicKey property for: " << path.value();
90 return "";
91 }
89 CHECK(Extension::ParsePEMKeyBytes(raw_key, &id_input)); 92 CHECK(Extension::ParsePEMKeyBytes(raw_key, &id_input));
90 std::string id = crx_file::id_util::GenerateId(id_input); 93 std::string id = crx_file::id_util::GenerateId(id_input);
91 return id; 94 return id;
92 } 95 }
93 96
94 #if defined(OS_CHROMEOS) 97 #if defined(OS_CHROMEOS)
95 scoped_ptr<base::DictionaryValue> 98 scoped_ptr<base::DictionaryValue>
96 LoadManifestOnFileThread( 99 LoadManifestOnFileThread(
97 const base::FilePath& root_directory, 100 const base::FilePath& root_directory,
98 const base::FilePath::CharType* manifest_filename) { 101 const base::FilePath::CharType* manifest_filename) {
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 const char* extension_id, 785 const char* extension_id,
783 const base::Closure& done_cb, 786 const base::Closure& done_cb,
784 scoped_ptr<base::DictionaryValue> manifest) { 787 scoped_ptr<base::DictionaryValue> manifest) {
785 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 788 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
786 if (!manifest) 789 if (!manifest)
787 return; // Error already logged. 790 return; // Error already logged.
788 std::string actual_extension_id = Add( 791 std::string actual_extension_id = Add(
789 manifest.release(), 792 manifest.release(),
790 root_directory, 793 root_directory,
791 false); 794 false);
792 CHECK_EQ(extension_id, actual_extension_id); 795 DCHECK_EQ(extension_id, actual_extension_id);
793 if (!done_cb.is_null()) 796 if (!done_cb.is_null())
794 done_cb.Run(); 797 done_cb.Run();
795 } 798 }
796 #endif 799 #endif
797 800
798 } // namespace extensions 801 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos/display_layout_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698