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

Side by Side Diff: chrome/browser/intents/web_intents_util.cc

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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 | 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/intents/web_intents_util.h" 5 #include "chrome/browser/intents/web_intents_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 11 #include "chrome/browser/ui/browser_list.h"
11 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
12 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
13 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
14 15
15 namespace web_intents { 16 namespace web_intents {
16 17
17 void RegisterUserPrefs(PrefService* user_prefs) { 18 void RegisterUserPrefs(PrefService* user_prefs) {
18 user_prefs->RegisterBooleanPref(prefs::kWebIntentsEnabled, true, 19 user_prefs->RegisterBooleanPref(prefs::kWebIntentsEnabled, true,
19 PrefService::SYNCABLE_PREF); 20 PrefService::SYNCABLE_PREF);
(...skipping 12 matching lines...) Expand all
32 bool IsWebIntentsEnabledInActiveBrowser() { 33 bool IsWebIntentsEnabledInActiveBrowser() {
33 Browser* browser = BrowserList::GetLastActive(); 34 Browser* browser = BrowserList::GetLastActive();
34 if (!browser) 35 if (!browser)
35 browser = *BrowserList::begin(); 36 browser = *BrowserList::begin();
36 DCHECK(browser); 37 DCHECK(browser);
37 38
38 return IsWebIntentsEnabled(browser->profile()); 39 return IsWebIntentsEnabled(browser->profile());
39 } 40 }
40 41
41 } // namespace web_intents 42 } // namespace web_intents
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698