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

Unified Diff: chrome/browser/component_updater/swiftshader_component_installer.cc

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add component updater to common dependency list 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/component_updater/swiftshader_component_installer.cc
diff --git a/chrome/browser/component_updater/swiftshader_component_installer.cc b/chrome/browser/component_updater/swiftshader_component_installer.cc
index e4c410aeab2f28d4612bccf452c466a581cee8e7..96f5e9e29e590340582f102c54c1b4f92f6bcd20 100644
--- a/chrome/browser/component_updater/swiftshader_component_installer.cc
+++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
@@ -19,7 +19,7 @@
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/browser/component_updater/component_updater_service.h"
-#include "chrome/common/chrome_paths.h"
+#include "components/component_updater/component_updater_paths.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/gpu_data_manager_observer.h"
@@ -46,9 +46,6 @@ const base::FilePath::CharType kSwiftShaderGlesName[] =
const char kSwiftShaderManifestName[] = "SwiftShader";
-const base::FilePath::CharType kSwiftShaderBaseDirectory[] =
- FILE_PATH_LITERAL("SwiftShader");
-
// If we don't have a SwiftShader component, this is the version we claim.
const char kNullVersion[] = "0.0.0.0";
@@ -56,8 +53,9 @@ const char kNullVersion[] = "0.0.0.0";
// <profile>\AppData\Local\Google\Chrome\User Data\SwiftShader\.
base::FilePath GetSwiftShaderBaseDirectory() {
base::FilePath result;
- PathService::Get(chrome::DIR_USER_DATA, &result);
- return result.Append(kSwiftShaderBaseDirectory);
+ if (!PathService::Get(DIR_SWIFT_SHADER, &result))
+ NOTREACHED() << "Couldn't get SwiftShader directory.";
+ return result;
}
// SwiftShader has version encoded in the path itself

Powered by Google App Engine
This is Rietveld 408576698