OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/sync/glue/theme_model_associator.h" | 5 #include "chrome/browser/sync/glue/theme_model_associator.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_theme_provider.h" | |
11 #include "chrome/browser/sync/engine/syncapi.h" | 10 #include "chrome/browser/sync/engine/syncapi.h" |
12 #include "chrome/browser/sync/glue/sync_backend_host.h" | 11 #include "chrome/browser/sync/glue/sync_backend_host.h" |
13 #include "chrome/browser/sync/glue/theme_util.h" | 12 #include "chrome/browser/sync/glue/theme_util.h" |
14 #include "chrome/browser/sync/profile_sync_service.h" | 13 #include "chrome/browser/sync/profile_sync_service.h" |
15 #include "chrome/browser/sync/protocol/theme_specifics.pb.h" | 14 #include "chrome/browser/sync/protocol/theme_specifics.pb.h" |
| 15 #include "chrome/browser/themes/browser_theme_provider.h" |
16 | 16 |
17 namespace browser_sync { | 17 namespace browser_sync { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 static const char kThemesTag[] = "google_chrome_themes"; | 21 static const char kThemesTag[] = "google_chrome_themes"; |
22 static const char kCurrentThemeNodeTitle[] = "Current Theme"; | 22 static const char kCurrentThemeNodeTitle[] = "Current Theme"; |
23 | 23 |
24 static const char kNoThemesFolderError[] = | 24 static const char kNoThemesFolderError[] = |
25 "Server did not create the top-level themes node. We " | 25 "Server did not create the top-level themes node. We " |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 LOG(ERROR) << kNoThemesFolderError; | 90 LOG(ERROR) << kNoThemesFolderError; |
91 return false; | 91 return false; |
92 } | 92 } |
93 // The sync model has user created nodes iff the themes folder has | 93 // The sync model has user created nodes iff the themes folder has |
94 // any children. | 94 // any children. |
95 *has_nodes = root.GetFirstChildId() != sync_api::kInvalidId; | 95 *has_nodes = root.GetFirstChildId() != sync_api::kInvalidId; |
96 return true; | 96 return true; |
97 } | 97 } |
98 | 98 |
99 } // namespace browser_sync | 99 } // namespace browser_sync |
OLD | NEW |