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

Side by Side Diff: chrome/browser/component_updater/default_component_installer.cc

Issue 138553004: Move component updater artifacts into component_updater namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/version.h" 10 #include "base/version.h"
11 // TODO(ddorwin): Find a better place for ReadManifest. 11 // TODO(ddorwin): Find a better place for ReadManifest.
12 #include "chrome/browser/component_updater/component_unpacker.h" 12 #include "chrome/browser/component_updater/component_unpacker.h"
13 #include "chrome/browser/component_updater/default_component_installer.h" 13 #include "chrome/browser/component_updater/default_component_installer.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 15
16 namespace component_updater {
17
16 namespace { 18 namespace {
17 // Version "0" corresponds to no installed version. By the server's conventions, 19 // Version "0" corresponds to no installed version. By the server's conventions,
18 // we represent it as a dotted quad. 20 // we represent it as a dotted quad.
19 const char kNullVersion[] = "0.0.0.0"; 21 const char kNullVersion[] = "0.0.0.0";
20 } // namespace 22 } // namespace
21 23
22 ComponentInstallerTraits::~ComponentInstallerTraits() { 24 ComponentInstallerTraits::~ComponentInstallerTraits() {
23 } 25 }
24 26
25 DefaultComponentInstaller::DefaultComponentInstaller( 27 DefaultComponentInstaller::DefaultComponentInstaller(
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 203
202 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) { 204 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) {
203 scoped_ptr<base::DictionaryValue> manifest_copy( 205 scoped_ptr<base::DictionaryValue> manifest_copy(
204 current_manifest_->DeepCopy()); 206 current_manifest_->DeepCopy());
205 installer_traits_->ComponentReady( 207 installer_traits_->ComponentReady(
206 current_version_, 208 current_version_,
207 GetInstallDirectory(), 209 GetInstallDirectory(),
208 manifest_copy.Pass()); 210 manifest_copy.Pass());
209 } 211 }
210 } 212 }
213
214 } // namespace component_updater
215
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698