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

Side by Side Diff: extensions/common/extension.cc

Issue 95133002: Add an extension bubble explaining which extensions are in dev mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'ed Created 7 years 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
« extensions/common/extension.h ('K') | « extensions/common/extension.h ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "extensions/common/extension.h" 5 #include "extensions/common/extension.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (Manifest::IsUnpackedLocation(location())) 379 if (Manifest::IsUnpackedLocation(location()))
380 return false; 380 return false;
381 381
382 // Don't show apps that aren't visible in either launcher or ntp. 382 // Don't show apps that aren't visible in either launcher or ntp.
383 if (is_app() && !ShouldDisplayInAppLauncher() && !ShouldDisplayInNewTabPage()) 383 if (is_app() && !ShouldDisplayInAppLauncher() && !ShouldDisplayInNewTabPage())
384 return true; 384 return true;
385 385
386 return false; 386 return false;
387 } 387 }
388 388
389 bool Extension::IsDevModeExtension() const {
390 return location() == Manifest::UNPACKED ||
391 location() == Manifest::COMMAND_LINE;
392 }
393
389 Extension::ManifestData* Extension::GetManifestData(const std::string& key) 394 Extension::ManifestData* Extension::GetManifestData(const std::string& key)
390 const { 395 const {
391 DCHECK(finished_parsing_manifest_ || thread_checker_.CalledOnValidThread()); 396 DCHECK(finished_parsing_manifest_ || thread_checker_.CalledOnValidThread());
392 ManifestDataMap::const_iterator iter = manifest_data_.find(key); 397 ManifestDataMap::const_iterator iter = manifest_data_.find(key);
393 if (iter != manifest_data_.end()) 398 if (iter != manifest_data_.end())
394 return iter->second.get(); 399 return iter->second.get();
395 return NULL; 400 return NULL;
396 } 401 }
397 402
398 void Extension::SetManifestData(const std::string& key, 403 void Extension::SetManifestData(const std::string& key,
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 789
785 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 790 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
786 const Extension* extension, 791 const Extension* extension,
787 const PermissionSet* permissions, 792 const PermissionSet* permissions,
788 Reason reason) 793 Reason reason)
789 : reason(reason), 794 : reason(reason),
790 extension(extension), 795 extension(extension),
791 permissions(permissions) {} 796 permissions(permissions) {}
792 797
793 } // namespace extensions 798 } // namespace extensions
OLDNEW
« extensions/common/extension.h ('K') | « extensions/common/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698