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

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

Issue 10382149: Refactor the various ways to control what users can do to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_constants.h » ('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 (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/common/extensions/extension.h" 5 #include "chrome/common/extensions/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/file_path.h" 10 #include "base/file_path.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 if (!GenerateId(path_bytes, &id)) 437 if (!GenerateId(path_bytes, &id))
438 return ""; 438 return "";
439 return id; 439 return id;
440 } 440 }
441 441
442 void Extension::GetBasicInfo(bool enabled, 442 void Extension::GetBasicInfo(bool enabled,
443 DictionaryValue* info) const { 443 DictionaryValue* info) const {
444 info->SetString(info_keys::kIdKey, id()); 444 info->SetString(info_keys::kIdKey, id());
445 info->SetString(info_keys::kNameKey, name()); 445 info->SetString(info_keys::kNameKey, name());
446 info->SetBoolean(info_keys::kEnabledKey, enabled); 446 info->SetBoolean(info_keys::kEnabledKey, enabled);
447 info->SetBoolean(info_keys::kMayDisableKey, UserMayDisable(location()));
448 info->SetBoolean(info_keys::kOfflineEnabledKey, offline_enabled()); 447 info->SetBoolean(info_keys::kOfflineEnabledKey, offline_enabled());
449 info->SetString(info_keys::kVersionKey, VersionString()); 448 info->SetString(info_keys::kVersionKey, VersionString());
450 info->SetString(info_keys::kDescriptionKey, description()); 449 info->SetString(info_keys::kDescriptionKey, description());
451 info->SetString(info_keys::kOptionsUrlKey, 450 info->SetString(info_keys::kOptionsUrlKey,
452 options_url().possibly_invalid_spec()); 451 options_url().possibly_invalid_spec());
453 info->SetString(info_keys::kHomepageUrlKey, 452 info->SetString(info_keys::kHomepageUrlKey,
454 GetHomepageURL().possibly_invalid_spec()); 453 GetHomepageURL().possibly_invalid_spec());
455 } 454 }
456 455
457 Extension::Type Extension::GetType() const { 456 Extension::Type Extension::GetType() const {
(...skipping 3177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3635 3634
3636 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3635 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3637 const Extension* extension, 3636 const Extension* extension,
3638 const ExtensionPermissionSet* permissions, 3637 const ExtensionPermissionSet* permissions,
3639 Reason reason) 3638 Reason reason)
3640 : reason(reason), 3639 : reason(reason),
3641 extension(extension), 3640 extension(extension),
3642 permissions(permissions) {} 3641 permissions(permissions) {}
3643 3642
3644 } // namespace extensions 3643 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698