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

Side by Side Diff: chrome/browser/intents/default_web_intent_service.h

Issue 10855065: Add a constructor to DefaultWebIntentServices that takes only the "interesting" args. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to review comments. Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/intents/default_web_intent_service.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) 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 #ifndef CHROME_BROWSER_INTENTS_DEFAULT_WEB_INTENT_SERVICE_H_ 5 #ifndef CHROME_BROWSER_INTENTS_DEFAULT_WEB_INTENT_SERVICE_H_
6 #define CHROME_BROWSER_INTENTS_DEFAULT_WEB_INTENT_SERVICE_H_ 6 #define CHROME_BROWSER_INTENTS_DEFAULT_WEB_INTENT_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "chrome/common/extensions/url_pattern.h" 11 #include "chrome/common/extensions/url_pattern.h"
12 12
13 // Holds data related to a default settings for web intents service 13 // Holds data related to a default settings for web intents service
14 // selection. Holds data in a row in the web_intents_defaults table. 14 // selection. Holds data in a row in the web_intents_defaults table.
15 // The key for the table is the |action|, |type|, and |url_pattern|. 15 // The key for the table is the |action|, |type|, and |url_pattern|.
16 // These describe the action and type of the web intent for which the 16 // These describe the action and type of the web intent for which the
17 // default is set, and the url prefix (if any) of source pages for 17 // default is set, and the url prefix (if any) of source pages for
18 // which the default applies. The main actionable value is the URL 18 // which the default applies. The main actionable value is the URL
19 // of the service or extension page handling the intent. The |user_date| 19 // of the service or extension page handling the intent. The |user_date|
20 // and |suppression| fields are provided for more intricate post-fetch 20 // and |suppression| fields are provided for more intricate post-fetch
21 // decisions about whether to use a particular default service. 21 // decisions about whether to use a particular default service.
22 struct DefaultWebIntentService { 22 struct DefaultWebIntentService {
23 string16 action; 23 string16 action;
24 string16 type; 24 string16 type;
25
25 URLPattern url_pattern; 26 URLPattern url_pattern;
26 27
27 // |user_date| holds the offset time when a user set the default. 28 // |user_date| holds the offset time when a user set the default.
28 // If the user did not set the default explicitly, is <= 0. 29 // If the user did not set the default explicitly, is <= 0.
29 int user_date; 30 int user_date;
30 31
31 // |suppression| holds a value modeling whether a default is suppressed. 32 // |suppression| holds a value modeling whether a default is suppressed.
32 // If it has value == 0, the default is active. 33 // If it has value == 0, the default is active.
33 int suppression; 34 int suppression;
34 35
35 std::string service_url; 36 std::string service_url;
36 37
37 DefaultWebIntentService(); 38 DefaultWebIntentService();
39 DefaultWebIntentService(
40 const string16& srv_action,
41 const string16& srv_type,
42 const std::string& srv_service_url);
38 ~DefaultWebIntentService(); 43 ~DefaultWebIntentService();
39 44
40 bool operator==(const DefaultWebIntentService& other) const; 45 bool operator==(const DefaultWebIntentService& other) const;
41 }; 46 };
42 47
43 #endif // CHROME_BROWSER_INTENTS_DEFAULT_WEB_INTENT_SERVICE_H_ 48 #endif // CHROME_BROWSER_INTENTS_DEFAULT_WEB_INTENT_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/intents/default_web_intent_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698