~osomon/oxide/fix-crash-popup-menu

« back to all changes in this revision

Viewing changes to shared/renderer/oxide_content_renderer_client.cc

  • Committer: Chris Coulson
  • Date: 2015-04-21 19:52:46 UTC
  • Revision ID: chris.coulson@canonical.com-20150421195246-r70ste5m9xmh7w8d
Make chrome://tracing/ work

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <string>
21
21
 
22
22
#include "base/command_line.h"
 
23
#include "base/strings/stringprintf.h"
23
24
#include "cc/trees/layer_tree_settings.h"
 
25
#include "content/public/common/url_constants.h"
24
26
#include "content/public/common/url_utils.h"
 
27
#include "content/public/common/user_agent.h"
25
28
#include "content/public/renderer/render_frame.h"
26
29
#include "content/public/renderer/render_thread.h"
27
30
#include "content/public/renderer/render_view.h"
30
33
#include "third_party/WebKit/public/web/WebView.h"
31
34
#include "ui/native_theme/native_theme_switches.h"
32
35
 
 
36
#include "shared/common/chrome_version.h"
33
37
#include "shared/common/oxide_constants.h"
34
38
#include "shared/common/oxide_messages.h"
35
39
 
95
99
 
96
100
std::string ContentRendererClient::GetUserAgentOverrideForURL(
97
101
    const GURL& url) {
 
102
  if (url.scheme() == content::kChromeUIScheme) {
 
103
    return content::BuildUserAgentFromProduct(
 
104
        base::StringPrintf("Chrome/%s", CHROME_VERSION_STRING));
 
105
  }
 
106
 
98
107
  GURL u = url;
99
108
 
100
109
  // Strip username / password / fragment identifier if they exist