Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/pending_extension_manager.h" | 5 #include "chrome/browser/extensions/pending_extension_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 } | 107 } |
| 108 | 108 |
| 109 const bool kIsFromSync = true; | 109 const bool kIsFromSync = true; |
| 110 const Extension::Location kSyncLocation = Extension::INTERNAL; | 110 const Extension::Location kSyncLocation = Extension::INTERNAL; |
| 111 | 111 |
| 112 return AddExtensionImpl(id, update_url, Version(), should_allow_install, | 112 return AddExtensionImpl(id, update_url, Version(), should_allow_install, |
| 113 kIsFromSync, install_silently, kSyncLocation); | 113 kIsFromSync, install_silently, kSyncLocation); |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool PendingExtensionManager::AddFromExternalUpdateUrl( | 116 bool PendingExtensionManager::AddFromExternalUpdateUrl( |
| 117 const std::string& id, const GURL& update_url, | 117 const std::string& id, |
|
Jeffrey Yasskin
2012/10/15 00:43:59
Revert this file?
Matt Perry
2012/10/15 19:13:38
Done.
| |
| 118 const GURL& update_url, | |
| 118 Extension::Location location) { | 119 Extension::Location location) { |
| 119 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 120 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 120 | 121 |
| 121 const bool kIsFromSync = false; | 122 const bool kIsFromSync = false; |
| 122 const bool kInstallSilently = true; | 123 const bool kInstallSilently = true; |
| 123 | 124 |
| 124 const Extension* extension = service_.GetInstalledExtension(id); | 125 const Extension* extension = service_.GetInstalledExtension(id); |
| 125 if (extension && | 126 if (extension && |
| 126 location == Extension::GetHigherPriorityLocation(location, | 127 location == Extension::GetHigherPriorityLocation(location, |
| 127 extension->location())) { | 128 extension->location())) { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 | 251 |
| 251 return true; | 252 return true; |
| 252 } | 253 } |
| 253 | 254 |
| 254 void PendingExtensionManager::AddForTesting( | 255 void PendingExtensionManager::AddForTesting( |
| 255 const PendingExtensionInfo& pending_extension_info) { | 256 const PendingExtensionInfo& pending_extension_info) { |
| 256 pending_extension_list_.push_back(pending_extension_info); | 257 pending_extension_list_.push_back(pending_extension_info); |
| 257 } | 258 } |
| 258 | 259 |
| 259 } // namespace extensions | 260 } // namespace extensions |
| OLD | NEW |