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

Side by Side Diff: chrome/browser/instant/instant_confirm_dialog.cc

Issue 5601003: Localize instant string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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) 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/instant/instant_confirm_dialog.h" 5 #include "chrome/browser/instant/instant_confirm_dialog.h"
6 6
7 #include "app/l10n_util.h"
7 #include "chrome/browser/instant/instant_controller.h" 8 #include "chrome/browser/instant/instant_controller.h"
8 #include "chrome/browser/instant/promo_counter.h" 9 #include "chrome/browser/instant/promo_counter.h"
9 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
13 #include "googleurl/src/gurl.h"
14 #include "grit/generated_resources.h"
12 15
13 namespace browser { 16 namespace browser {
14 17
15 const char kInstantLearnMoreURL[] = 18 GURL InstantLearnMoreURL() {
16 "http://www.google.com/support/chrome/bin/answer.py?answer=180655"; 19 return GURL(l10n_util::GetStringUTF8(IDS_INSTANT_LEARN_MORE_URL));
20 }
17 21
18 void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent, 22 void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent,
19 Profile* profile) { 23 Profile* profile) {
20 PrefService* prefs = profile->GetPrefs(); 24 PrefService* prefs = profile->GetPrefs();
21 if (!prefs) 25 if (!prefs)
22 return; 26 return;
23 27
24 PromoCounter* promo_counter = profile->GetInstantPromoCounter(); 28 PromoCounter* promo_counter = profile->GetInstantPromoCounter();
25 if (promo_counter) 29 if (promo_counter)
26 promo_counter->Hide(); 30 promo_counter->Hide();
27 31
28 if (prefs->GetBoolean(prefs::kInstantConfirmDialogShown)) { 32 if (prefs->GetBoolean(prefs::kInstantConfirmDialogShown)) {
29 InstantController::Enable(profile); 33 InstantController::Enable(profile);
30 return; 34 return;
31 } 35 }
32 36
33 ShowInstantConfirmDialog(parent, profile); 37 ShowInstantConfirmDialog(parent, profile);
34 } 38 }
35 39
36 } // namespace browser 40 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_confirm_dialog.h ('k') | chrome/browser/ui/cocoa/instant_confirm_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698