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

Side by Side Diff: chrome/browser/themes/browser_theme_pack.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 BrowserThemePack::BrowserThemePack() 883 BrowserThemePack::BrowserThemePack()
884 : CustomThemeSupplier(EXTENSION), 884 : CustomThemeSupplier(EXTENSION),
885 header_(NULL), 885 header_(NULL),
886 tints_(NULL), 886 tints_(NULL),
887 colors_(NULL), 887 colors_(NULL),
888 display_properties_(NULL), 888 display_properties_(NULL),
889 source_images_(NULL) { 889 source_images_(NULL) {
890 scale_factors_ = ui::GetSupportedScaleFactors(); 890 scale_factors_ = ui::GetSupportedScaleFactors();
891 // On Windows HiDPI SCALE_FACTOR_100P may not be supported by default. 891 // On Windows HiDPI SCALE_FACTOR_100P may not be supported by default.
892 if (!ContainsValue(scale_factors_, ui::SCALE_FACTOR_100P)) 892 if (!base::ContainsValue(scale_factors_, ui::SCALE_FACTOR_100P))
893 scale_factors_.push_back(ui::SCALE_FACTOR_100P); 893 scale_factors_.push_back(ui::SCALE_FACTOR_100P);
894 } 894 }
895 895
896 void BrowserThemePack::BuildHeader(const Extension* extension) { 896 void BrowserThemePack::BuildHeader(const Extension* extension) {
897 header_ = new BrowserThemePackHeader; 897 header_ = new BrowserThemePackHeader;
898 header_->version = kThemePackVersion; 898 header_->version = kThemePackVersion;
899 899
900 // TODO(erg): Need to make this endian safe on other computers. Prerequisite 900 // TODO(erg): Need to make this endian safe on other computers. Prerequisite
901 // is that ui::DataPack removes this same check. 901 // is that ui::DataPack removes this same check.
902 #if defined(__BYTE_ORDER) 902 #if defined(__BYTE_ORDER)
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 false, 1541 false,
1542 &bitmap_data)) { 1542 &bitmap_data)) {
1543 NOTREACHED() << "Unable to encode theme image for prs_id=" 1543 NOTREACHED() << "Unable to encode theme image for prs_id="
1544 << prs_id << " for scale_factor=" << scale_factors_[i]; 1544 << prs_id << " for scale_factor=" << scale_factors_[i];
1545 break; 1545 break;
1546 } 1546 }
1547 image_memory_[scaled_raw_id] = 1547 image_memory_[scaled_raw_id] =
1548 base::RefCountedBytes::TakeVector(&bitmap_data); 1548 base::RefCountedBytes::TakeVector(&bitmap_data);
1549 } 1549 }
1550 } 1550 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698