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

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

Issue 5023001: Handful of related instant changes: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux build Created 10 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
« no previous file with comments | « chrome/browser/instant/instant_opt_in.h ('k') | chrome/browser/instant/promo_counter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/instant/instant_opt_in.h"
6
7 #include "base/command_line.h"
8 #include "chrome/browser/instant/instant_confirm_dialog.h"
9 #include "chrome/browser/profile.h"
10 #include "chrome/common/chrome_switches.h"
11
12 namespace browser {
13
14 static bool dialog_shown = false;
15
16 bool ShouldShowInstantOptIn(Profile* profile) {
17 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowInstantOptIn))
18 return false;
19
20 // TODO(sky): implement me.
21 return !dialog_shown;
22 }
23
24 void UserPickedInstantOptIn(gfx::NativeWindow parent,
25 Profile* profile,
26 bool opt_in) {
27 // TODO: set pref so don't show opt-in again.
28 dialog_shown = true;
29 if (opt_in)
30 browser::ShowInstantConfirmDialogIfNecessary(parent, profile);
31 }
32
33 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_opt_in.h ('k') | chrome/browser/instant/promo_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698