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

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: 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
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 14 matching lines...) Expand all
94 bool IsSyncableExtension(const Extension* extension) { 97 bool IsSyncableExtension(const Extension* extension) {
95 return GetSyncType(extension) == SYNC_TYPE_EXTENSION; 98 return GetSyncType(extension) == SYNC_TYPE_EXTENSION;
96 } 99 }
97 100
98 bool IsSyncableApp(const Extension* extension) { 101 bool IsSyncableApp(const Extension* extension) {
99 return GetSyncType(extension) == SYNC_TYPE_APP; 102 return GetSyncType(extension) == SYNC_TYPE_APP;
100 } 103 }
101 104
102 } // namespace sync_helper 105 } // namespace sync_helper
103 } // namespace extensions 106 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698