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

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

Issue 285293004: Allow browser tests to run with dynamic CLD data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cld_uma
Patch Set: Yet more #ifdefs for compiler cleanliness Created 6 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/component_updater/cld_component_installer.h" 5 #include "chrome/browser/component_updater/cld_component_installer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return true; 54 return true;
55 } 55 }
56 56
57 bool CldComponentInstallerTraits::OnCustomInstall( 57 bool CldComponentInstallerTraits::OnCustomInstall(
58 const base::DictionaryValue& manifest, 58 const base::DictionaryValue& manifest,
59 const base::FilePath& install_dir) { 59 const base::FilePath& install_dir) {
60 return true; // Nothing custom here. 60 return true; // Nothing custom here.
61 } 61 }
62 62
63 base::FilePath CldComponentInstallerTraits::GetInstalledPath( 63 base::FilePath CldComponentInstallerTraits::GetInstalledPath(
64 const base::FilePath& base) const { 64 const base::FilePath& base) {
65 // Currently, all platforms have the file at the same location because there 65 // Currently, all platforms have the file at the same location because there
66 // is no binary difference in the generated file on any supported platform. 66 // is no binary difference in the generated file on any supported platform.
67 // NB: This may change when 64-bit is officially supported. 67 // NB: This may change when 64-bit is officially supported.
68 return base.Append(FILE_PATH_LITERAL("_platform_specific")) 68 return base.Append(FILE_PATH_LITERAL("_platform_specific"))
69 .Append(FILE_PATH_LITERAL("all")) 69 .Append(FILE_PATH_LITERAL("all"))
70 .Append(chrome::kCLDDataFilename); 70 .Append(chrome::kCLDDataFilename);
71 } 71 }
72 72
73 void CldComponentInstallerTraits::ComponentReady( 73 void CldComponentInstallerTraits::ComponentReady(
74 const base::Version& version, 74 const base::Version& version,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 cld_file.Get() = path; 122 cld_file.Get() = path;
123 } 123 }
124 124
125 base::FilePath GetLatestCldDataFile() { 125 base::FilePath GetLatestCldDataFile() {
126 base::AutoLock lock(cld_file_lock.Get()); 126 base::AutoLock lock(cld_file_lock.Get());
127 // cld_file is an empty path by default, meaning "file not available yet". 127 // cld_file is an empty path by default, meaning "file not available yet".
128 return cld_file.Get(); 128 return cld_file.Get();
129 } 129 }
130 130
131 } // namespace component_updater 131 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698