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

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

Issue 256022: Loads local resources from current locale subtree if available, if not it fal... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | chrome/browser/extensions/execute_code_in_tab_function.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // TODO(aa): Also support expected version? 117 // TODO(aa): Also support expected version?
118 if (!expected_id_.empty() && expected_id_ != extension->id()) { 118 if (!expected_id_.empty() && expected_id_ != extension->id()) {
119 ReportFailureFromFileThread(StringPrintf( 119 ReportFailureFromFileThread(StringPrintf(
120 "ID in new extension manifest (%s) does not match expected id (%s)", 120 "ID in new extension manifest (%s) does not match expected id (%s)",
121 extension->id().c_str(), 121 extension->id().c_str(),
122 expected_id_.c_str())); 122 expected_id_.c_str()));
123 return; 123 return;
124 } 124 }
125 125
126 if (client_.get()) { 126 if (client_.get()) {
127 DecodeInstallIcon(extension_->GetIconPath(Extension::EXTENSION_ICON_LARGE), 127 FilePath icon_path =
128 &install_icon_); 128 extension_->GetIconPath(Extension::EXTENSION_ICON_LARGE).GetFilePath();
129 DecodeInstallIcon(icon_path, &install_icon_);
129 } 130 }
130 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, 131 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod(this,
131 &CrxInstaller::ConfirmInstall)); 132 &CrxInstaller::ConfirmInstall));
132 } 133 }
133 134
134 // static 135 // static
135 void CrxInstaller::DecodeInstallIcon(const FilePath& large_icon_path, 136 void CrxInstaller::DecodeInstallIcon(const FilePath& large_icon_path,
136 scoped_ptr<SkBitmap>* result) { 137 scoped_ptr<SkBitmap>* result) {
137 if (large_icon_path.empty()) 138 if (large_icon_path.empty())
138 return; 139 return;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 client_->OnInstallSuccess(extension_.get()); 305 client_->OnInstallSuccess(extension_.get());
305 306
306 // Tell the frontend about the installation and hand off ownership of 307 // Tell the frontend about the installation and hand off ownership of
307 // extension_ to it. 308 // extension_ to it.
308 frontend_->OnExtensionInstalled(extension_.release(), 309 frontend_->OnExtensionInstalled(extension_.release(),
309 allow_privilege_increase_); 310 allow_privilege_increase_);
310 311
311 // We're done. We don't post any more tasks to ourselves so we are deleted 312 // We're done. We don't post any more tasks to ourselves so we are deleted
312 // soon. 313 // soon.
313 } 314 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/execute_code_in_tab_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698