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

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

Issue 11742005: Move [Homepage,Options,Update,DevTools]URL out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Created 7 years, 11 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/theme_syncable_service.h" 5 #include "chrome/browser/themes/theme_syncable_service.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/themes/theme_service.h" 11 #include "chrome/browser/themes/theme_service.h"
12 #include "chrome/common/extensions/api/extension_urls/extension_urls_handler.h"
12 #include "chrome/common/extensions/extension.h" 13 #include "chrome/common/extensions/extension.h"
13 #include "sync/protocol/sync.pb.h" 14 #include "sync/protocol/sync.pb.h"
14 #include "sync/protocol/theme_specifics.pb.h" 15 #include "sync/protocol/theme_specifics.pb.h"
15 16
16 using std::string; 17 using std::string;
17 18
18 namespace { 19 namespace {
19 20
20 bool IsTheme(const extensions::Extension& extension) { 21 bool IsTheme(const extensions::Extension& extension) {
21 return extension.is_theme(); 22 return extension.is_theme();
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 theme_specifics->set_use_system_theme_by_default( 262 theme_specifics->set_use_system_theme_by_default(
262 use_system_theme_by_default_); 263 use_system_theme_by_default_);
263 } 264 }
264 265
265 if (use_custom_theme) { 266 if (use_custom_theme) {
266 DCHECK(current_theme); 267 DCHECK(current_theme);
267 DCHECK(current_theme->is_theme()); 268 DCHECK(current_theme->is_theme());
268 theme_specifics->set_custom_theme_name(current_theme->name()); 269 theme_specifics->set_custom_theme_name(current_theme->name());
269 theme_specifics->set_custom_theme_id(current_theme->id()); 270 theme_specifics->set_custom_theme_id(current_theme->id());
270 theme_specifics->set_custom_theme_update_url( 271 theme_specifics->set_custom_theme_update_url(
271 current_theme->update_url().spec()); 272 extensions::ExtensionURL::GetUpdateURL(current_theme).spec());
272 } else { 273 } else {
273 DCHECK(!current_theme); 274 DCHECK(!current_theme);
274 theme_specifics->clear_custom_theme_name(); 275 theme_specifics->clear_custom_theme_name();
275 theme_specifics->clear_custom_theme_id(); 276 theme_specifics->clear_custom_theme_id();
276 theme_specifics->clear_custom_theme_update_url(); 277 theme_specifics->clear_custom_theme_update_url();
277 } 278 }
278 } 279 }
279 280
280 /* static */ 281 /* static */
281 bool ThemeSyncableService::AreThemeSpecificsEqual( 282 bool ThemeSyncableService::AreThemeSpecificsEqual(
(...skipping 30 matching lines...) Expand all
312 syncer::SyncChange(FROM_HERE, change_type, 313 syncer::SyncChange(FROM_HERE, change_type,
313 syncer::SyncData::CreateLocalData( 314 syncer::SyncData::CreateLocalData(
314 kCurrentThemeClientTag, kCurrentThemeNodeTitle, 315 kCurrentThemeClientTag, kCurrentThemeNodeTitle,
315 entity_specifics))); 316 entity_specifics)));
316 317
317 DVLOG(1) << "Update theme specifics from current theme: " 318 DVLOG(1) << "Update theme specifics from current theme: "
318 << changes.back().ToString(); 319 << changes.back().ToString();
319 320
320 return sync_processor_->ProcessSyncChanges(FROM_HERE, changes); 321 return sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
321 } 322 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_dependency_manager.cc ('k') | chrome/browser/themes/theme_syncable_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698