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

Side by Side Diff: chrome/browser/extensions/bundle_installer.cc

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 (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/browser/extensions/bundle_installer.h" 5 #include "chrome/browser/extensions/bundle_installer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Creates a dummy extension and sets the manifest's name to the item's 44 // Creates a dummy extension and sets the manifest's name to the item's
45 // localized name. 45 // localized name.
46 scoped_refptr<Extension> CreateDummyExtension(const BundleInstaller::Item& item, 46 scoped_refptr<Extension> CreateDummyExtension(const BundleInstaller::Item& item,
47 DictionaryValue* manifest) { 47 DictionaryValue* manifest) {
48 // We require localized names so we can have nice error messages when we can't 48 // We require localized names so we can have nice error messages when we can't
49 // parse an extension manifest. 49 // parse an extension manifest.
50 CHECK(!item.localized_name.empty()); 50 CHECK(!item.localized_name.empty());
51 51
52 std::string error; 52 std::string error;
53 return Extension::Create(FilePath(), 53 return Extension::Create(FilePath(),
54 Extension::INTERNAL, 54 Manifest::INTERNAL,
55 *manifest, 55 *manifest,
56 Extension::NO_FLAGS, 56 Extension::NO_FLAGS,
57 item.id, 57 item.id,
58 &error); 58 &error);
59 } 59 }
60 60
61 bool IsAppPredicate(scoped_refptr<const Extension> extension) { 61 bool IsAppPredicate(scoped_refptr<const Extension> extension) {
62 return extension->is_app(); 62 return extension->is_app();
63 } 63 }
64 64
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 void BundleInstaller::OnBrowserAdded(Browser* browser) {} 347 void BundleInstaller::OnBrowserAdded(Browser* browser) {}
348 348
349 void BundleInstaller::OnBrowserRemoved(Browser* browser) { 349 void BundleInstaller::OnBrowserRemoved(Browser* browser) {
350 if (browser_ == browser) 350 if (browser_ == browser)
351 browser_ = NULL; 351 browser_ = NULL;
352 } 352 }
353 353
354 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} 354 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {}
355 355
356 } // namespace extensions 356 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.cc ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698