blob: 282166397edaef13e6bd7e34bb0f980c1d1ba6b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SYNC_GLUE_THEME_UTIL_H_
#define CHROME_BROWSER_SYNC_GLUE_THEME_UTIL_H_
class Extension;
class Profile;
namespace sync_pb {
class ThemeSpecifics;
} // sync_pb
namespace browser_sync {
extern const char kCurrentThemeClientTag[];
// Returns true iff two ThemeSpecifics indicate the same theme.
bool AreThemeSpecificsEqual(const sync_pb::ThemeSpecifics& a,
const sync_pb::ThemeSpecifics& b);
// Exposed only for testing.
bool AreThemeSpecificsEqualHelper(
const sync_pb::ThemeSpecifics& a,
const sync_pb::ThemeSpecifics& b,
bool is_system_theme_distinct_from_default_theme);
// Sets the current theme from the information in the given
// ThemeSpecifics.
void SetCurrentThemeFromThemeSpecifics(
const sync_pb::ThemeSpecifics& theme_specifics,
Profile* profile);
// Sets all fields of the given ThemeSpecifics according to the
// current theme.
void GetThemeSpecificsFromCurrentTheme(
Profile* profile,
sync_pb::ThemeSpecifics* theme_specifics);
// Exposed only for testing.
void GetThemeSpecificsFromCurrentThemeHelper(
const Extension* current_theme,
bool is_system_theme_distinct_from_default_theme,
bool use_system_theme_by_default,
sync_pb::ThemeSpecifics* theme_specifics);
// Like SetChrrentThemeFromThemeSpecifics() except does nothing if the
// current theme is equivalent to that described by theme_specifics.
void SetCurrentThemeFromThemeSpecificsIfNecessary(
const sync_pb::ThemeSpecifics& theme_specifics, Profile* profile);
} // namespace browser_sync
#endif // CHROME_BROWSER_SYNC_GLUE_THEME_UTIL_H_
|