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

Side by Side Diff: chrome/common/extensions/sync_helper.cc

Issue 299853002: Make installed_loader UMA less wasteful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | « chrome/browser/extensions/installed_loader.cc ('k') | extensions/browser/admin_policy.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/common/extensions/sync_helper.h" 5 #include "chrome/common/extensions/sync_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/extensions/api/plugins/plugins_handler.h" 8 #include "chrome/common/extensions/api/plugins/plugins_handler.h"
9 #include "chrome/common/extensions/extension_constants.h" 9 #include "chrome/common/extensions/extension_constants.h"
10 #include "chrome/common/extensions/manifest_url_handler.h" 10 #include "chrome/common/extensions/manifest_url_handler.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 case Manifest::TYPE_LEGACY_PACKAGED_APP: 60 case Manifest::TYPE_LEGACY_PACKAGED_APP:
61 case Manifest::TYPE_PLATFORM_APP: 61 case Manifest::TYPE_PLATFORM_APP:
62 return SYNC_TYPE_APP; 62 return SYNC_TYPE_APP;
63 63
64 case Manifest::TYPE_UNKNOWN: 64 case Manifest::TYPE_UNKNOWN:
65 // Confusingly, themes are actually synced. 65 // Confusingly, themes are actually synced.
66 // TODO(yoz): Make this look less inconsistent. 66 // TODO(yoz): Make this look less inconsistent.
67 case Manifest::TYPE_THEME: 67 case Manifest::TYPE_THEME:
68 case Manifest::TYPE_SHARED_MODULE: 68 case Manifest::TYPE_SHARED_MODULE:
69 return SYNC_TYPE_NONE; 69 return SYNC_TYPE_NONE;
70
71 case Manifest::NUM_LOAD_TYPES:
72 NOTREACHED();
70 } 73 }
71 NOTREACHED(); 74 NOTREACHED();
72 return SYNC_TYPE_NONE; 75 return SYNC_TYPE_NONE;
73 } 76 }
74 77
75 } // namespace 78 } // namespace
76 79
77 bool IsSyncable(const Extension* extension) { 80 bool IsSyncable(const Extension* extension) {
78 // TODO(akalin): Figure out if we need to allow some other types. 81 // TODO(akalin): Figure out if we need to allow some other types.
79 82
(...skipping 13 matching lines...) Expand all
93 bool IsSyncableExtension(const Extension* extension) { 96 bool IsSyncableExtension(const Extension* extension) {
94 return GetSyncType(extension) == SYNC_TYPE_EXTENSION; 97 return GetSyncType(extension) == SYNC_TYPE_EXTENSION;
95 } 98 }
96 99
97 bool IsSyncableApp(const Extension* extension) { 100 bool IsSyncableApp(const Extension* extension) {
98 return GetSyncType(extension) == SYNC_TYPE_APP; 101 return GetSyncType(extension) == SYNC_TYPE_APP;
99 } 102 }
100 103
101 } // namespace sync_helper 104 } // namespace sync_helper
102 } // namespace extensions 105 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | extensions/browser/admin_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698