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

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 2447553003: More pre-MD odds and ends. (Closed)
Patch Set: self review Created 4 years, 2 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/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 9f616658d2b0190e4d9462f46e8a041eb71b5071..30e75aca014843c51c02ef118f460d0e1541f477 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -39,7 +39,6 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "ui/base/layout.h"
-#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/image/image_skia.h"
@@ -573,13 +572,10 @@ void ThemeService::LoadThemePrefs() {
bool loaded_pack = false;
- // If we don't have a file pack, we're updating from an old version, or the
- // pack was created for an alternative MaterialDesignController::Mode.
+ // If we don't have a file pack, we're updating from an old version.
base::FilePath path = prefs->GetFilePath(prefs::kCurrentThemePackFilename);
if (path != base::FilePath()) {
- path = path.Append(ui::MaterialDesignController::IsModeMaterial()
- ? chrome::kThemePackMaterialDesignFilename
- : chrome::kThemePackFilename);
+ path = path.Append(chrome::kThemePackFilename);
SwapThemeSupplier(BrowserThemePack::BuildFromDataPack(path, current_id));
if (theme_supplier_)
loaded_pack = true;
@@ -858,15 +854,13 @@ void ThemeService::BuildFromExtension(const Extension* extension) {
// Write the packed file to disk.
base::FilePath pack_path =
- extension->path().Append(ui::MaterialDesignController::IsModeMaterial()
- ? chrome::kThemePackMaterialDesignFilename
- : chrome::kThemePackFilename);
+ extension->path().Append(chrome::kThemePackFilename);
service->GetFileTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&WritePackToDiskCallback, base::RetainedRef(pack), pack_path));
- // Save only the extension path. The packed file which matches the
- // MaterialDesignController::Mode will be loaded via LoadThemePrefs().
+ // Save only the extension path. The packed file will be loaded via
+ // LoadThemePrefs().
SavePackName(extension->path());
SwapThemeSupplier(pack);
}

Powered by Google App Engine
This is Rietveld 408576698