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

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

Issue 385013002: Componentize component_updater: Replace content::BrowserThread usage with task runners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ran git cl format Created 6 years, 5 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 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"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "base/threading/sequenced_worker_pool.h"
waffles 2014/07/22 21:20:59 Is this still needed?
tommycli 2014/07/22 21:47:43 Done.
17 #include "components/component_updater/component_updater_paths.h" 17 #include "components/component_updater/component_updater_paths.h"
18 #include "components/translate/content/browser/data_file_browser_cld_data_provid er.h" 18 #include "components/translate/content/browser/data_file_browser_cld_data_provid er.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 #include "net/ssl/ssl_config_service.h" 20 #include "net/ssl/ssl_config_service.h"
21 21
22 using component_updater::ComponentUpdateService; 22 using component_updater::ComponentUpdateService;
23 using content::BrowserThread;
24 23
25 namespace { 24 namespace {
26 // TODO(andrewhayden): Make the data file path into a gyp/gn define 25 // TODO(andrewhayden): Make the data file path into a gyp/gn define
27 // If you change this, also update component_cld_data_harness.cc 26 // If you change this, also update component_cld_data_harness.cc
28 // and cld_component_installer_unittest.cc accordingly! 27 // and cld_component_installer_unittest.cc accordingly!
29 const base::FilePath::CharType kCldDataFileName[] = 28 const base::FilePath::CharType kCldDataFileName[] =
30 FILE_PATH_LITERAL("cld2_data.bin"); 29 FILE_PATH_LITERAL("cld2_data.bin");
31 } // namespace 30 } // namespace
32 31
33 namespace component_updater { 32 namespace component_updater {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 installer->Register(cus); 114 installer->Register(cus);
116 } 115 }
117 116
118 void CldComponentInstallerTraits::SetLatestCldDataFile( 117 void CldComponentInstallerTraits::SetLatestCldDataFile(
119 const base::FilePath& path) { 118 const base::FilePath& path) {
120 VLOG(1) << "Setting CLD data file location: " << path.value(); 119 VLOG(1) << "Setting CLD data file location: " << path.value();
121 translate::DataFileBrowserCldDataProvider::SetCldDataFilePath(path); 120 translate::DataFileBrowserCldDataProvider::SetCldDataFilePath(path);
122 } 121 }
123 122
124 } // namespace component_updater 123 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698