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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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
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/installed_loader.h" 5 #include "chrome/browser/extensions/installed_loader.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 NOTREACHED(); 166 NOTREACHED();
167 167
168 Version old_version; 168 Version old_version;
169 if (info->extension_manifest) { 169 if (info->extension_manifest) {
170 std::string version_str; 170 std::string version_str;
171 if (info->extension_manifest->GetString( 171 if (info->extension_manifest->GetString(
172 extension_manifest_keys::kVersion, &version_str)) { 172 extension_manifest_keys::kVersion, &version_str)) {
173 old_version = Version(version_str); 173 old_version = Version(version_str);
174 } 174 }
175 } 175 }
176 MessageLoop::current()->PostTask(FROM_HERE, 176 base::MessageLoop::current()->PostTask(FROM_HERE,
177 base::Bind(&DispatchOnInstalledEvent, extension_service_->profile(), 177 base::Bind(&DispatchOnInstalledEvent, extension_service_->profile(),
178 info->extension_id, old_version, false)); 178 info->extension_id, old_version, false));
179 179
180 info = extension_prefs_->GetInstalledExtensionInfo( 180 info = extension_prefs_->GetInstalledExtensionInfo(
181 info->extension_id).release(); 181 info->extension_id).release();
182 extensions_info->at(i).reset(info); 182 extensions_info->at(i).reset(info);
183 183
184 update_count++; 184 update_count++;
185 } 185 }
186 186
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { 380 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
381 int flags = extension_prefs_->GetCreationFlags(info->extension_id); 381 int flags = extension_prefs_->GetCreationFlags(info->extension_id);
382 if (!Manifest::IsUnpackedLocation(info->extension_location)) 382 if (!Manifest::IsUnpackedLocation(info->extension_location))
383 flags |= Extension::REQUIRE_KEY; 383 flags |= Extension::REQUIRE_KEY;
384 if (extension_prefs_->AllowFileAccess(info->extension_id)) 384 if (extension_prefs_->AllowFileAccess(info->extension_id))
385 flags |= Extension::ALLOW_FILE_ACCESS; 385 flags |= Extension::ALLOW_FILE_ACCESS;
386 return flags; 386 return flags;
387 } 387 }
388 388
389 } // namespace extensions 389 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/image_loader_unittest.cc ('k') | chrome/browser/extensions/menu_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698