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

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

Issue 2884423002: Increase theme version to fix M57->M58 upgrade not migrating themes. (Closed)
Patch Set: Created 3 years, 7 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
« 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')
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 30 matching lines...) Expand all
41 41
42 using content::BrowserThread; 42 using content::BrowserThread;
43 using extensions::Extension; 43 using extensions::Extension;
44 44
45 namespace { 45 namespace {
46 46
47 // Version number of the current theme pack. We just throw out and rebuild 47 // Version number of the current theme pack. We just throw out and rebuild
48 // theme packs that aren't int-equal to this. Increment this number if you 48 // theme packs that aren't int-equal to this. Increment this number if you
49 // change default theme assets or if you need themes to recreate their generated 49 // change default theme assets or if you need themes to recreate their generated
50 // images (which are cached). 50 // images (which are cached).
51 const int kThemePackVersion = 47; 51 const int kThemePackVersion = 48;
52 52
53 // IDs that are in the DataPack won't clash with the positive integer 53 // IDs that are in the DataPack won't clash with the positive integer
54 // uint16_t. kHeaderID should always have the maximum value because we want the 54 // uint16_t. kHeaderID should always have the maximum value because we want the
55 // "header" to be written last. That way we can detect whether the pack was 55 // "header" to be written last. That way we can detect whether the pack was
56 // successfully written and ignore and regenerate if it was only partially 56 // successfully written and ignore and regenerate if it was only partially
57 // written (i.e. chrome crashed on a different thread while writing the pack). 57 // written (i.e. chrome crashed on a different thread while writing the pack).
58 const int kMaxID = 0x0000FFFF; // Max unsigned 16-bit int. 58 const int kMaxID = 0x0000FFFF; // Max unsigned 16-bit int.
59 const int kHeaderID = kMaxID - 1; 59 const int kHeaderID = kMaxID - 1;
60 const int kTintsID = kMaxID - 2; 60 const int kTintsID = kMaxID - 2;
61 const int kColorsID = kMaxID - 3; 61 const int kColorsID = kMaxID - 3;
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 false, 1431 false,
1432 &bitmap_data)) { 1432 &bitmap_data)) {
1433 NOTREACHED() << "Unable to encode theme image for prs_id=" 1433 NOTREACHED() << "Unable to encode theme image for prs_id="
1434 << prs_id << " for scale_factor=" << scale_factors_[i]; 1434 << prs_id << " for scale_factor=" << scale_factors_[i];
1435 break; 1435 break;
1436 } 1436 }
1437 image_memory_[scaled_raw_id] = 1437 image_memory_[scaled_raw_id] =
1438 base::RefCountedBytes::TakeVector(&bitmap_data); 1438 base::RefCountedBytes::TakeVector(&bitmap_data);
1439 } 1439 }
1440 } 1440 }
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