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

Side by Side Diff: chrome/browser/dom_ui/tips_handler.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
« no previous file with comments | « chrome/browser/dom_ui/slideshow_ui.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/dom_ui/tips_handler.h" 12 #include "chrome/browser/dom_ui/tips_handler.h"
13 #include "chrome/browser/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/web_resource/web_resource_service.h" 14 #include "chrome/browser/web_resource/web_resource_service.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "chrome/common/web_resource/web_resource_unpacker.h" 16 #include "chrome/common/web_resource/web_resource_unpacker.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
20 20
21 DOMMessageHandler* TipsHandler::Attach(DOMUI* dom_ui) { 21 DOMMessageHandler* TipsHandler::Attach(DOMUI* dom_ui) {
22 dom_ui_ = dom_ui; 22 dom_ui_ = dom_ui;
23 tips_cache_ = dom_ui_->GetProfile()->GetPrefs()-> 23 tips_cache_ = dom_ui_->GetProfile()->GetPrefs()->
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 prefs->RegisterDictionaryPref(prefs::kNTPWebResourceCache); 101 prefs->RegisterDictionaryPref(prefs::kNTPWebResourceCache);
102 prefs->RegisterStringPref(prefs::kNTPWebResourceServer, 102 prefs->RegisterStringPref(prefs::kNTPWebResourceServer,
103 WebResourceService::kDefaultWebResourceServer); 103 WebResourceService::kDefaultWebResourceServer);
104 } 104 }
105 105
106 bool TipsHandler::IsValidURL(const std::wstring& url_string) { 106 bool TipsHandler::IsValidURL(const std::wstring& url_string) {
107 GURL url(WideToUTF8(url_string)); 107 GURL url(WideToUTF8(url_string));
108 return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) || 108 return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) ||
109 url.SchemeIs(chrome::kHttpsScheme)); 109 url.SchemeIs(chrome::kHttpsScheme));
110 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/slideshow_ui.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698