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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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
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/ui/webui/ntp/ntp_resource_cache.h" 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 NOTIMPLEMENTED(); 49 NOTIMPLEMENTED();
50 return NULL; 50 return NULL;
51 } 51 }
52 52
53 void NTPResourceCache::Observe(int type, 53 void NTPResourceCache::Observe(int type,
54 const content::NotificationSource& source, 54 const content::NotificationSource& source,
55 const content::NotificationDetails& details) { 55 const content::NotificationDetails& details) {
56 // No notifications necessary in Android. 56 // No notifications necessary in Android.
57 } 57 }
58 58
59 void NTPResourceCache::OnPreferenceChanged(PrefServiceBase* service,
60 const std::string& pref_name) {
61 // No notifications necessary in Android.
62 }
63
59 void NTPResourceCache::CreateNewTabHTML() { 64 void NTPResourceCache::CreateNewTabHTML() {
60 // TODO(estade): these strings should be defined in their relevant handlers 65 // TODO(estade): these strings should be defined in their relevant handlers
61 // (in GetLocalizedValues) and should have more legible names. 66 // (in GetLocalizedValues) and should have more legible names.
62 // Show the profile name in the title and most visited labels if the current 67 // Show the profile name in the title and most visited labels if the current
63 // profile is not the default. 68 // profile is not the default.
64 DictionaryValue localized_strings; 69 DictionaryValue localized_strings;
65 localized_strings.SetBoolean("hasattribution", false); 70 localized_strings.SetBoolean("hasattribution", false);
66 localized_strings.SetString("title", 71 localized_strings.SetString("title",
67 l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE)); 72 l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE));
68 localized_strings.SetString("mostvisited", 73 localized_strings.SetString("mostvisited",
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 size_t after_offset = pos + template_data_placeholder.size(); 135 size_t after_offset = pos + template_data_placeholder.size();
131 full_html.append(new_tab_html.data() + after_offset, 136 full_html.append(new_tab_html.data() + after_offset,
132 new_tab_html.size() - after_offset); 137 new_tab_html.size() - after_offset);
133 } else { 138 } else {
134 NOTREACHED(); 139 NOTREACHED();
135 full_html.assign(new_tab_html.data(), new_tab_html.size()); 140 full_html.assign(new_tab_html.data(), new_tab_html.size());
136 } 141 }
137 142
138 new_tab_html_ = base::RefCountedString::TakeString(&full_html); 143 new_tab_html_ = base::RefCountedString::TakeString(&full_html);
139 } 144 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698