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

Side by Side Diff: chrome/browser/browser_theme_provider.cc

Issue 159461: Merge 21538 - Stop using strings for NTP logo inversion... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/browser_theme_provider.cc:r21538
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser_theme_provider.h" 5 #include "chrome/browser/browser_theme_provider.h"
6 6
7 #include "base/gfx/png_decoder.h" 7 #include "base/gfx/png_decoder.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 StringToAlignment(val); 596 StringToAlignment(val);
597 } else if (base::strcasecmp(WideToUTF8(*iter).c_str(), 597 } else if (base::strcasecmp(WideToUTF8(*iter).c_str(),
598 kDisplayPropertyNTPTiling) == 0) { 598 kDisplayPropertyNTPTiling) == 0) {
599 std::string val; 599 std::string val;
600 if (display_properties_value->GetString(*iter, &val)) 600 if (display_properties_value->GetString(*iter, &val))
601 display_properties_[kDisplayPropertyNTPTiling] = 601 display_properties_[kDisplayPropertyNTPTiling] =
602 StringToTiling(val); 602 StringToTiling(val);
603 } 603 }
604 if (base::strcasecmp(WideToUTF8(*iter).c_str(), 604 if (base::strcasecmp(WideToUTF8(*iter).c_str(),
605 kDisplayPropertyNTPInverseLogo) == 0) { 605 kDisplayPropertyNTPInverseLogo) == 0) {
606 std::string val; 606 int val = 0;
607 if (display_properties_value->GetString(*iter, &val)) 607 if (display_properties_value->GetInteger(*iter, &val))
608 display_properties_[kDisplayPropertyNTPInverseLogo] = StringToInt(val); 608 display_properties_[kDisplayPropertyNTPInverseLogo] = val;
609 } 609 }
610 ++iter; 610 ++iter;
611 } 611 }
612 } 612 }
613 613
614 // static 614 // static
615 int BrowserThemeProvider::StringToAlignment(const std::string& alignment) { 615 int BrowserThemeProvider::StringToAlignment(const std::string& alignment) {
616 std::vector<std::wstring> split; 616 std::vector<std::wstring> split;
617 SplitStringAlongWhitespace(UTF8ToWide(alignment), &split); 617 SplitStringAlongWhitespace(UTF8ToWide(alignment), &split);
618 618
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 delete i->second; 946 delete i->second;
947 } 947 }
948 image_cache_.clear(); 948 image_cache_.clear();
949 } 949 }
950 950
951 #if defined(TOOLKIT_VIEWS) 951 #if defined(TOOLKIT_VIEWS)
952 void BrowserThemeProvider::FreePlatformCaches() { 952 void BrowserThemeProvider::FreePlatformCaches() {
953 // Views (Skia) has no platform image cache to clear. 953 // Views (Skia) has no platform image cache to clear.
954 } 954 }
955 #endif 955 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698