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

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

Issue 5606002: Move:... (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 "chrome/browser/instant/instant_controller.h" 7 #include "chrome/browser/instant/instant_controller.h"
8 #include "chrome/browser/instant/promo_counter.h" 8 #include "chrome/browser/instant/promo_counter.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 12
13 namespace browser { 13 namespace browser {
14 14
15 // TODO: get the right url. 15 // TODO: get the right url.
16 const char kInstantLearnMoreURL[] = "http://www.google.com"; 16 const char kInstantLearnMoreURL[] = "http://www.google.com";
17 17
18 void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent, 18 void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent,
19 Profile* profile) { 19 Profile* profile) {
20 PrefService* prefs = profile->GetPrefs(); 20 PrefService* prefs = profile->GetPrefs();
21 if (!prefs) 21 if (!prefs)
22 return; 22 return;
23 23
24 PromoCounter* promo_counter = profile->GetInstantPromoCounter(); 24 PromoCounter* promo_counter = profile->GetInstantPromoCounter();
25 if (promo_counter) 25 if (promo_counter)
26 promo_counter->Hide(); 26 promo_counter->Hide();
27 27
28 if (prefs->GetBoolean(prefs::kInstantConfirmDialogShown)) { 28 if (prefs->GetBoolean(prefs::kInstantConfirmDialogShown)) {
29 InstantController::Enable(profile); 29 InstantController::Enable(profile);
30 return; 30 return;
31 } 31 }
32 32
33 ShowInstantConfirmDialog(parent, profile); 33 ShowInstantConfirmDialog(parent, profile);
34 } 34 }
35 35
36 } // namespace browser 36 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698