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

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

Issue 10977048: Fix bug in disabling sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix browser and integration tests, which got broken Created 8 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
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/file_path.h" 7 #include "base/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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadUserScript", user_script_count); 296 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadUserScript", user_script_count);
297 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadTheme", theme_count); 297 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadTheme", theme_count);
298 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadPageAction", page_action_count); 298 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadPageAction", page_action_count);
299 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadBrowserAction", 299 UMA_HISTOGRAM_COUNTS_100("Extensions.LoadBrowserAction",
300 browser_action_count); 300 browser_action_count);
301 UMA_HISTOGRAM_COUNTS_100("Extensions.DisabledForPermissions", 301 UMA_HISTOGRAM_COUNTS_100("Extensions.DisabledForPermissions",
302 disabled_for_permissions_count); 302 disabled_for_permissions_count);
303 } 303 }
304 304
305 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { 305 int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) {
306 int flags = Extension::NO_FLAGS; 306 int flags = extension_prefs_->GetCreationFlags(info->extension_id);
307 if (info->extension_location != Extension::LOAD) 307 if (info->extension_location != Extension::LOAD)
308 flags |= Extension::REQUIRE_KEY; 308 flags |= Extension::REQUIRE_KEY;
309 if (extension_prefs_->AllowFileAccess(info->extension_id)) 309 if (extension_prefs_->AllowFileAccess(info->extension_id))
310 flags |= Extension::ALLOW_FILE_ACCESS; 310 flags |= Extension::ALLOW_FILE_ACCESS;
311 if (extension_prefs_->IsFromWebStore(info->extension_id))
312 flags |= Extension::FROM_WEBSTORE;
313 if (extension_prefs_->IsFromBookmark(info->extension_id))
314 flags |= Extension::FROM_BOOKMARK;
315 if (extension_prefs_->WasInstalledByDefault(info->extension_id)) {
316 flags |= Extension::WAS_INSTALLED_BY_DEFAULT;
317 }
318 return flags; 311 return flags;
319 } 312 }
320 313
321 } // namespace extensions 314 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_sorting_unittest.cc ('k') | chrome/browser/extensions/test_extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698