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

Unified Diff: chrome/common/extensions/extension_builder.cc

Issue 48643003: Moved extension and value builder code to extensions component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension_builder.h ('k') | chrome/common/extensions/extension_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_builder.cc
diff --git a/chrome/common/extensions/extension_builder.cc b/chrome/common/extensions/extension_builder.cc
deleted file mode 100644
index c7786f8b9afcf1689244e4e4124156776c9210a7..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/extension_builder.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/extensions/extension_builder.h"
-
-#include "chrome/common/extensions/extension.h"
-
-namespace extensions {
-
-ExtensionBuilder::ExtensionBuilder()
- : location_(Manifest::UNPACKED),
- flags_(Extension::NO_FLAGS) {
-}
-ExtensionBuilder::~ExtensionBuilder() {}
-
-scoped_refptr<Extension> ExtensionBuilder::Build() {
- std::string error;
- scoped_refptr<Extension> extension = Extension::Create(
- path_,
- location_,
- *manifest_,
- flags_,
- id_,
- &error);
- CHECK_EQ("", error);
- return extension;
-}
-
-ExtensionBuilder& ExtensionBuilder::SetPath(const base::FilePath& path) {
- path_ = path;
- return *this;
-}
-
-ExtensionBuilder& ExtensionBuilder::SetLocation(Manifest::Location location) {
- location_ = location;
- return *this;
-}
-
-ExtensionBuilder& ExtensionBuilder::SetManifest(
- scoped_ptr<base::DictionaryValue> manifest) {
- manifest_ = manifest.Pass();
- return *this;
-}
-
-ExtensionBuilder& ExtensionBuilder::MergeManifest(DictionaryBuilder& builder) {
- manifest_->MergeDictionary(builder.Build().get());
- return *this;
-}
-
-ExtensionBuilder& ExtensionBuilder::AddFlags(int init_from_value_flags) {
- flags_ |= init_from_value_flags;
- return *this;
-}
-
-ExtensionBuilder& ExtensionBuilder::SetID(const std::string& id) {
- id_ = id;
- return *this;
-}
-
-} // namespace extensions
« no previous file with comments | « chrome/common/extensions/extension_builder.h ('k') | chrome/common/extensions/extension_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698